name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hudi_HoodieInputFormatUtils_getWritePartitionPaths | /**
* Returns all the incremental write partition paths as a set with the given commits metadata.
*
* @param metadataList The commits metadata
* @return the partition path set
*/
public static Set<String> getWritePartitionPaths(List<HoodieCommitMetadata> metadataList) {
return metadataList.stream()
.map(Ho... | 3.68 |
flink_MetricStore_retainTaskManagers | /**
* Remove inactive task managers.
*
* @param activeTaskManagers to retain.
*/
synchronized void retainTaskManagers(List<String> activeTaskManagers) {
taskManagers.keySet().retainAll(activeTaskManagers);
} | 3.68 |
hudi_HoodieHFileDataBlock_printRecord | /**
* Print the record in json format
*/
private void printRecord(String msg, byte[] bs, Schema schema) throws IOException {
GenericRecord record = HoodieAvroUtils.bytesToAvro(bs, schema);
byte[] json = HoodieAvroUtils.avroToJson(record, true);
LOG.error(String.format("%s: %s", msg, new String(json)));
} | 3.68 |
hadoop_CommitUtils_extractJobID | /**
* Extract the job ID from a configuration.
* @param conf configuration
* @return a job ID or null.
*/
public static String extractJobID(Configuration conf) {
String jobUUID = conf.getTrimmed(FS_S3A_COMMITTER_UUID, "");
if (!jobUUID.isEmpty()) {
return jobUUID;
}
// there is no job UUID.
// look ... | 3.68 |
hbase_RequestConverter_buildGetRegionInfoRequest | /**
* Create a protocol buffer GetRegionInfoRequest,
* @param regionName the name of the region to get info
* @param includeCompactionState indicate if the compaction state is requested
* @param includeBestSplitRow indicate if the bestSplitRow is requested
* @return protocol buffer GetRegionInfoRequ... | 3.68 |
hadoop_DecayRpcSchedulerDetailedMetrics_addQueueTime | /**
* Instrument a Call queue time based on its priority.
*
* @param priority of the RPC call
* @param queueTime of the RPC call in the queue of the priority
*/
public void addQueueTime(int priority, long queueTime) {
rpcQueueRates.add(queueNamesForLevels[priority], queueTime);
} | 3.68 |
hbase_SimpleRegionNormalizer_isSplitEnabled | /**
* Return this instance's configured value for {@value #SPLIT_ENABLED_KEY}.
*/
public boolean isSplitEnabled() {
return normalizerConfiguration.isSplitEnabled();
} | 3.68 |
hadoop_SolverPreprocessor_validate | /**
* Check if Solver's input parameters are valid.
*
* @param jobHistory the history {@link ResourceSkyline}s of the recurring
* pipeline job.
* @param timeInterval the time interval which is used to discretize the
* history {@link ResourceSkyline}s.
* @throws InvalidIn... | 3.68 |
graphhopper_Entity_loadTable | /**
* The main entry point into an Entity.Loader. Interprets each row of a CSV file within a zip file as a sinle
* GTFS entity, and loads them into a table.
*
* @param zipOrDirectory the zip file or directory from which to read a table
*/
public void loadTable(File zipOrDirectory) throws IOException {
InputStr... | 3.68 |
flink_Costs_getHeuristicCpuCost | /**
* Gets the heuristic cost for the CPU.
*
* @return The heuristic CPU Cost.
*/
public double getHeuristicCpuCost() {
return this.heuristicCpuCost;
} | 3.68 |
framework_VCaption_setTooltipInfo | /**
* Sets the tooltip that should be shown for the caption.
*
* @param tooltipInfo
* The tooltip that should be shown or null if no tooltip should
* be shown
*/
public void setTooltipInfo(TooltipInfo tooltipInfo) {
this.tooltipInfo = tooltipInfo;
} | 3.68 |
pulsar_NamespaceBundleStats_compareTo | // compare 2 bundles in below aspects:
// 1. Inbound bandwidth
// 2. Outbound bandwidth
// 3. Total megRate (both in and out)
// 4. Total topics and producers/consumers
// 5. Total cache size
public int compareTo(NamespaceBundleStats other) {
int result = this.compareByBandwidthIn(other);
if (result == 0) {
... | 3.68 |
hadoop_TimelineMetricOperation_exec | /**
* Return the average value of the incoming metric and the base metric,
* with a given state. Not supported yet.
*
* @param incoming Metric a
* @param base Metric b
* @param state Operation state
* @return Not finished yet
*/
@Override
public TimelineMetric exec(TimelineMetric incoming, TimelineMetric base,
... | 3.68 |
hbase_KeyValueUtil_createFirstOnRow | /**
* Create a KeyValue for the specified row, family and qualifier that would be smaller than all
* other possible KeyValues that have the same row, family, qualifier. Used for seeking.
* @param buffer the buffer to use for the new <code>KeyValue</code> object
* @param boffset buffer offset
* @param row ... | 3.68 |
flink_TwoPhaseCommitSinkFunction_invoke | /** This should not be implemented by subclasses. */
@Override
public final void invoke(IN value) throws Exception {} | 3.68 |
pulsar_ProxyConnection_doAuthentication | // According to auth result, send newConnected or newAuthChallenge command.
private void doAuthentication(AuthData clientData)
throws Exception {
authState
.authenticateAsync(clientData)
.whenCompleteAsync((authChallenge, throwable) -> {
if (throwable == null) {
... | 3.68 |
hmily_NacosPassiveConfig_fileName | /**
* File name string.
*
* @return the string
*/
public String fileName() {
return dataId + "." + fileExtension;
} | 3.68 |
querydsl_AliasFactory_createAliasForExpr | /**
* Create an alias instance for the given class and Expression
*
* @param <A>
* @param cl type for alias
* @param expr underlying expression
* @return alias instance
*/
@SuppressWarnings("unchecked")
public <A> A createAliasForExpr(Class<A> cl, Expression<? extends A> expr) {
try {
final Map<Expre... | 3.68 |
flink_ExceptionUtils_tryDeserializeAndThrow | /**
* Tries to find a {@link SerializedThrowable} as the cause of the given throwable and throws
* its deserialized value. If there is no such throwable, then the original throwable is thrown.
*
* @param throwable to check for a SerializedThrowable
* @param classLoader to be used for the deserialization of the Ser... | 3.68 |
streampipes_PipelineManager_deletePipeline | /**
* Deletes the pipeline with the pipeline Id
*
* @param pipelineId of pipeline to be deleted
*/
public static void deletePipeline(String pipelineId) {
var pipeline = getPipeline(pipelineId);
if (Objects.nonNull(pipeline)) {
getPipelineStorage().deletePipeline(pipelineId);
new NotificationsResourceMan... | 3.68 |
framework_AbstractOrderedLayoutConnector_getState | /*
* (non-Javadoc)
*
* @see com.vaadin.client.ui.AbstractLayoutConnector#getState()
*/
@Override
public AbstractOrderedLayoutState getState() {
return (AbstractOrderedLayoutState) super.getState();
} | 3.68 |
hbase_PrivateCellUtil_writeRowSkippingBytes | /**
* Writes the row from the given cell to the output stream excluding the common prefix
* @param out The dataoutputstream to which the data has to be written
* @param cell The cell whose contents has to be written
* @param rlength the row length
*/
public static void writeRowSkippingBytes(DataOutputStream... | 3.68 |
hbase_BalanceResponse_setBalancerRan | /**
* Set true if the balancer ran, otherwise false. The balancer may not run in some
* circumstances, such as if a balance is already running or there are regions already in
* transition.
* @param balancerRan true if balancer ran, false otherwise
*/
public Builder setBalancerRan(boolean balancerRan) {
this.bala... | 3.68 |
hbase_ReplicationSyncUp_main | /**
* Main program
*/
public static void main(String[] args) throws Exception {
int ret = ToolRunner.run(HBaseConfiguration.create(), new ReplicationSyncUp(), args);
System.exit(ret);
} | 3.68 |
hbase_VersionInfo_getSrcChecksum | /**
* Get the checksum of the source files from which Hadoop was compiled.
* @return a string that uniquely identifies the source
**/
public static String getSrcChecksum() {
return Version.srcChecksum;
} | 3.68 |
dubbo_Environment_setLocalMigrationRule | /**
* @deprecated only for ut
*/
@Deprecated
@DisableInject
public void setLocalMigrationRule(String localMigrationRule) {
this.localMigrationRule = localMigrationRule;
} | 3.68 |
hadoop_DatanodeAdminProperties_setUpgradeDomain | /**
* Set the upgrade domain of the datanode.
* @param upgradeDomain the upgrade domain of the datanode.
*/
public void setUpgradeDomain(final String upgradeDomain) {
this.upgradeDomain = upgradeDomain;
} | 3.68 |
framework_ComboBoxElement_isTextInputAllowed | /**
* Checks if text input is allowed for the combo box.
*
* @return <code>true</code> if text input is allowed, <code>false</code>
* otherwise
*/
public boolean isTextInputAllowed() {
return !isReadOnly(getInputField());
} | 3.68 |
morf_InsertStatementDefaulter_getColumnsWithValues | /**
* Gets a set of columns for which values have been provided.
*
* @param statement the statement to parse.
* @return a set of columns for which values have been provided.
*/
private Set<String> getColumnsWithValues(InsertStatement statement) {
Set<String> columnsWithValues = new HashSet<>();
addColumns(sta... | 3.68 |
hbase_RegionServerSnapshotManager_getRegionsToSnapshot | /**
* Determine if the snapshot should be handled on this server NOTE: This is racy -- the master
* expects a list of regionservers. This means if a region moves somewhere between the calls we'll
* miss some regions. For example, a region move during a snapshot could result in a region to be
* skipped or done twice... | 3.68 |
hbase_HRegionFileSystem_removeStoreFile | /**
* Archives the specified store file from the specified family.
* @param familyName Family that contains the store files
* @param filePath {@link Path} to the store file to remove
* @throws IOException if the archiving fails
*/
public void removeStoreFile(final String familyName, final Path filePath) throws I... | 3.68 |
framework_FieldGroup_setEnabled | /**
* Updates the enabled state of all bound fields.
*
* @param fieldsEnabled
* true to enable all bound fields, false to disable them
*/
public void setEnabled(boolean fieldsEnabled) {
enabled = fieldsEnabled;
for (Field<?> field : getFields()) {
field.setEnabled(fieldsEnabled);
}
} | 3.68 |
hbase_HDFSBlocksDistribution_getHostAndWeights | /** Returns the hosts and their weights */
public Map<String, HostAndWeight> getHostAndWeights() {
return this.hostAndWeights;
} | 3.68 |
hbase_ReplicationSourceWALReader_take | /**
* Retrieves the next batch of WAL entries from the queue, waiting up to the specified time for a
* batch to become available
* @return A batch of entries, along with the position in the log after reading the batch
* @throws InterruptedException if interrupted while waiting
*/
public WALEntryBatch take() throws... | 3.68 |
hbase_SnapshotManager_isSnapshotCompleted | /**
* Check to see if the snapshot is one of the currently completed snapshots Returns true if the
* snapshot exists in the "completed snapshots folder".
* @param snapshot expected snapshot to check
* @return <tt>true</tt> if the snapshot is stored on the {@link FileSystem}, <tt>false</tt> if is
* not stor... | 3.68 |
flink_Either_obtainLeft | /**
* Utility function for {@link EitherSerializer} to support object reuse.
*
* <p>To support object reuse both subclasses of Either contain a reference to an instance of
* the other type. This method provides access to and initializes the cross-reference.
*
* @param input container for Left or Right value
* @p... | 3.68 |
hbase_RegionPlacementMaintainer_getFavoredNodeList | /**
* @param favoredNodesStr The String of favored nodes
* @return the list of ServerName for the byte array of favored nodes.
*/
public static List<ServerName> getFavoredNodeList(String favoredNodesStr) {
String[] favoredNodesArray = StringUtils.split(favoredNodesStr, ",");
if (favoredNodesArray == null) return... | 3.68 |
hadoop_WordListAnonymizerUtility_needsAnonymization | /**
* Checks if the data needs anonymization. Typically, data types which are
* numeric in nature doesn't need anonymization.
*/
public static boolean needsAnonymization(String data) {
// Numeric data doesn't need anonymization
// Currently this doesnt support inputs like
// - 12.3
// - 12.3f
// - 9... | 3.68 |
flink_JarManifestParser_findFirstManifestAttribute | /**
* Returns the value of the first manifest attribute found in the provided JAR file.
*
* @param jarFile JAR file to parse
* @param attributes Attributes to check
* @return Optional holding value of first found attribute
* @throws IOException If there is an error accessing the JAR
*/
public static Optional<Str... | 3.68 |
hadoop_RoleModel_addResources | /**
* Add a list of resources.
* @param resources resource list
* @return this statement.
*/
public Statement addResources(Collection<String> resources) {
resource.addAll(resources);
return this;
} | 3.68 |
hbase_RegistryEndpointsRefresher_mainLoop | // The main loop for the refresh thread.
private void mainLoop() {
long lastRefreshTime = EnvironmentEdgeManager.currentTime();
boolean firstRefresh = true;
for (;;) {
synchronized (this) {
for (;;) {
if (stopped) {
LOG.info("Registry end points refresher loop exited.");
retu... | 3.68 |
hbase_HBaseTestingUtility_deleteTableIfAny | /**
* Drop an existing table
* @param tableName existing table
*/
public void deleteTableIfAny(TableName tableName) throws IOException {
try {
deleteTable(tableName);
} catch (TableNotFoundException e) {
// ignore
}
} | 3.68 |
hadoop_QueueCapacityUpdateContext_getUpdatedClusterResource | /**
* Returns the overall cluster resource available for the update phase of empty label.
* @return cluster resource
*/
public Resource getUpdatedClusterResource() {
return updatedClusterResource;
} | 3.68 |
hbase_SkipFilter_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;
}
if (!(o instanceof SkipFilter)) {
return false;
}
SkipFilter o... | 3.68 |
zxing_PlanarYUVLuminanceSource_getThumbnailHeight | /**
* @return height of image from {@link #renderThumbnail()}
*/
public int getThumbnailHeight() {
return getHeight() / THUMBNAIL_SCALE_FACTOR;
} | 3.68 |
framework_ComponentLocator_getPathForElement | /**
* Generates a String locator which uniquely identifies the target element.
* The {@link #getElementByPath(String)} method can be used for the inverse
* operation, i.e. locating an element based on the return value from this
* method.
* <p>
* Note that getElementByPath(getPathForElement(element)) == element is... | 3.68 |
hadoop_TimelinePutResponse_setErrorCode | /**
* Set the error code to the given error code
*
* @param errorCode
* an error code
*/
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
} | 3.68 |
flink_PeriodicMaterializationManager_close | // task thread and task canceler can access this method
public synchronized void close() {
LOG.info("Shutting down PeriodicMaterializationManager.");
if (!periodicExecutor.isShutdown()) {
periodicExecutor.shutdownNow();
}
} | 3.68 |
flink_DataStreamUtils_collectUnboundedStream | /**
* Triggers execution of the DataStream application and collects the given number of records
* from the stream. After the records are received, the execution is canceled.
*
* @deprecated Please use {@link DataStream#executeAndCollect()}.
*/
@Deprecated
public static <E> List<E> collectUnboundedStream(
D... | 3.68 |
hadoop_ReleaseContainerEvent_getContainer | /**
* Get RMContainer.
* @return RMContainer.
*/
public RMContainer getContainer() {
return container;
} | 3.68 |
hbase_ByteBufferUtils_copyFromArrayToBuffer | /**
* Copies bytes from given array's offset to length part into the given buffer. Puts the bytes to
* buffer's given position. This doesn't affect the position of buffer.
* @param out output bytebuffer to copy to
* @param outOffset output buffer offset
* @param in input array to copy from
* @param i... | 3.68 |
flink_AbstractStreamOperatorV2_getProcessingTimeService | /**
* Returns the {@link ProcessingTimeService} responsible for getting the current processing time
* and registering timers.
*/
@VisibleForTesting
public ProcessingTimeService getProcessingTimeService() {
return processingTimeService;
} | 3.68 |
hudi_CloudObjectsSelectorCommon_getUrlForFile | /**
* Construct a full qualified URL string to a cloud file from a given Row. Optionally check if the file exists.
* Here Row is assumed to have the schema [bucket_name, filepath_relative_to_bucket].
* The checkIfExists logic assumes that the relevant impl classes for the storageUrlSchemePrefix are already present
... | 3.68 |
flink_HttpHeader_getValue | /**
* Returns the value of this HTTP header.
*
* @return the value of this HTTP header
*/
public String getValue() {
return value;
} | 3.68 |
morf_RenameTable_getName | /**
* @see org.alfasoftware.morf.metadata.Table#getName()
*/
@Override
public String getName() {
return newName;
} | 3.68 |
MagicPlugin_Mage_doSetCurrency | // Returns the change, which may have been capped by min or max
private double doSetCurrency(String key, double newValue) {
Currency currency = initCurrency(key);
return doSetCurrency(currency, key, newValue);
} | 3.68 |
hudi_BaseHoodieFunctionalIndexClient_register | /**
* Register a functional index.
* Index definitions are stored in user-specified path or, by default, in .hoodie/.index_defs/index.json.
* For the first time, the index definition file will be created if not exists.
* For the second time, the index definition file will be updated if exists.
* Table Config is up... | 3.68 |
pulsar_DispatchRateLimiter_isDispatchRateLimitingEnabled | /**
* Checks if dispatch-rate limiting is enabled.
*
* @return
*/
public boolean isDispatchRateLimitingEnabled() {
return dispatchRateLimiterOnMessage != null || dispatchRateLimiterOnByte != null;
} | 3.68 |
hbase_CompoundConfiguration_addStringMap | /**
* Add String map to config list. This map is generally created by HTableDescriptor or
* HColumnDescriptor, but can be abstractly used. The added configuration overrides the previous
* ones if there are name collisions.
* @return this, for builder pattern
*/
public CompoundConfiguration addStringMap(final Map<S... | 3.68 |
rocketmq-connect_RecordOffsetManagement_pollOffsetWhile | /**
* @param submittedPositions
* @return
*/
private RecordOffset pollOffsetWhile(Deque<SubmittedPosition> submittedPositions) {
RecordOffset offset = null;
// Stop pulling if there is an uncommitted breakpoint
while (canCommitHead(submittedPositions)) {
offset = submittedPositions.poll().getPosi... | 3.68 |
hbase_InstancePending_prepare | /**
* Associates the given instance for the method {@link #get}. This method should be called once,
* and {@code instance} should be non-null. This method is expected to call as soon as possible
* because the method {@code get} is uninterruptibly blocked until this method is called.
*/
void prepare(T instance) {
... | 3.68 |
hadoop_TimelineReaderWebServicesUtils_createTimelineReaderContext | /**
* Parse the passed context information represented as strings and convert
* into a {@link TimelineReaderContext} object.
* @param clusterId Cluster Id.
* @param userId User Id.
* @param flowName Flow Name.
* @param flowRunId Run id for the flow.
* @param appId App Id.
* @param entityType Entity Type.
* @pa... | 3.68 |
flink_AbstractBytesHashMap_appendRecord | // ----------------------- Append -----------------------
public int appendRecord(LookupInfo<K, BinaryRowData> lookupInfo, BinaryRowData value)
throws IOException {
final long oldLastPosition = outView.getCurrentOffset();
// serialize the key into the BytesHashMap record area
int skip = keySerialize... | 3.68 |
dubbo_NettyHttpRestServer_getChannelHandlers | /**
* create channel handler
*
* @param url
* @return
*/
protected List<ChannelHandler> getChannelHandlers(URL url) {
List<ChannelHandler> channelHandlers = new ArrayList<>();
return channelHandlers;
} | 3.68 |
hadoop_StoragePolicySatisfyManager_stop | /**
* This function will do following logic based on the configured sps mode:
*
* <p>
* If the configured mode is {@link StoragePolicySatisfierMode#EXTERNAL}, then
* it won't do anything. Administrator requires to stop external sps service
* explicitly, if needed.
*
* <p>
* If the configured mode is {@link Sto... | 3.68 |
hbase_HRegionServer_getOnlineRegionsLocalContext | /**
* For tests, web ui and metrics. This method will only work if HRegionServer is in the same JVM
* as client; HRegion cannot be serialized to cross an rpc.
*/
public Collection<HRegion> getOnlineRegionsLocalContext() {
Collection<HRegion> regions = this.onlineRegions.values();
return Collections.unmodifiableC... | 3.68 |
framework_VAbstractTextualDate_setPlaceholder | /**
* Sets the placeholder for this textual date input.
*
* @param placeholder
* the placeholder to set, or {@code null} to clear
*/
public void setPlaceholder(String placeholder) {
if (placeholder != null) {
text.getElement().setAttribute("placeholder", placeholder);
} else {
te... | 3.68 |
rocketmq-connect_PositionStorageWriter_writeOffset | /**
* write offsets
*
* @param positions positions
*/
@Override
public void writeOffset(Map<RecordPartition, RecordOffset> positions) {
for (Map.Entry<RecordPartition, RecordOffset> offset : positions.entrySet()) {
writeOffset(offset.getKey(), offset.getValue());
}
} | 3.68 |
hbase_EncryptionUtil_wrapKey | /**
* Protect a key by encrypting it with the secret key of the given subject. The configuration must
* be set up correctly for key alias resolution.
* @param conf configuration
* @param subject subject key alias
* @param key the key
* @return the encrypted key bytes
*/
public static byte[] wrapKey(Config... | 3.68 |
framework_VTabsheet_recalculateCaptionWidths | /**
* Recalculates the caption widths for all tabs within this tab bar, and
* updates the tab width bookkeeping if necessary.
*/
private void recalculateCaptionWidths() {
for (int i = 0; i < getTabCount(); ++i) {
getTab(i).recalculateCaptionWidth();
}
} | 3.68 |
dubbo_Version_isRelease263OrHigher | /**
* Check the framework release version number to decide if it's 2.6.3 or higher
*
* @param version, the sdk version
*/
public static boolean isRelease263OrHigher(String version) {
return getIntVersion(version) >= 2060300;
} | 3.68 |
hudi_HoodieTableConfig_populateMetaFields | /**
* @returns true is meta fields need to be populated. else returns false.
*/
public boolean populateMetaFields() {
return Boolean.parseBoolean(getStringOrDefault(POPULATE_META_FIELDS));
} | 3.68 |
flink_NettyShuffleEnvironment_getPartitionsOccupyingLocalResources | /**
* Report unreleased partitions.
*
* @return collection of partitions which still occupy some resources locally on this task
* executor and have been not released yet.
*/
@Override
public Collection<ResultPartitionID> getPartitionsOccupyingLocalResources() {
return resultPartitionManager.getUnreleasedPa... | 3.68 |
framework_ScrollbarBundle_setScrollPos | /**
* Sets the scroll position of the scrollbar in the axis the scrollbar is
* representing.
* <p>
* <em>Note:</em> Even though {@code double} values are used, they are
* currently only used as integers as large {@code int} (or small but fast
* {@code long}). This means, all values are truncated to zero decimal
... | 3.68 |
nifi-maven_NarProvidedDependenciesMojo_getProject | /**
* Gets the Maven project used by this mojo.
*
* @return the Maven project
*/
public MavenProject getProject() {
return project;
} | 3.68 |
hbase_Segment_dump | // Debug methods
/**
* Dumps all cells of the segment into the given log
*/
void dump(Logger log) {
for (Cell cell : getCellSet()) {
log.debug(Objects.toString(cell));
}
} | 3.68 |
flink_EnvironmentSettings_build | /** Returns an immutable instance of {@link EnvironmentSettings}. */
public EnvironmentSettings build() {
if (classLoader == null) {
classLoader = Thread.currentThread().getContextClassLoader();
}
return new EnvironmentSettings(configuration, classLoader, catalogStore);
} | 3.68 |
framework_GridLayout_newLine | /**
* Forces the next component to be added at the beginning of the next line.
*
* <p>
* Sets the cursor column to 0 and increments the cursor row by one.
* </p>
*
* <p>
* By calling this function you can ensure that no more components are added
* right of the previous component.
* </p>
*
* @see #space()
*... | 3.68 |
hbase_ZKVisibilityLabelWatcher_writeToZookeeper | /**
* Write a labels mirror or user auths mirror into zookeeper
* @param labelsOrUserAuths true for writing labels and false for user auths.
*/
public void writeToZookeeper(byte[] data, boolean labelsOrUserAuths) {
String znode = this.labelZnode;
if (!labelsOrUserAuths) {
znode = this.userAuthsZnode;
}
t... | 3.68 |
flink_CheckpointStorageLocationReference_isDefaultReference | /** Returns true, if this object is the default reference. */
public boolean isDefaultReference() {
return encodedReference == null;
} | 3.68 |
flink_TaskManagerExceptionUtils_tryEnrichTaskManagerError | /**
* Tries to enrich the passed exception or its causes with additional information.
*
* <p>This method improves error messages for direct and metaspace {@link OutOfMemoryError}. It
* adds descriptions about possible causes and ways of resolution.
*
* @param root The Throwable of which the cause tree shall be tr... | 3.68 |
flink_BlockerSync_releaseBlocker | /** Lets the blocked thread continue. */
public void releaseBlocker() {
synchronized (lock) {
blockerReleased = true;
lock.notifyAll();
}
} | 3.68 |
hbase_HFileCleaner_countDeletedFiles | // Currently only for testing purpose
private void countDeletedFiles(boolean isLargeFile, boolean fromLargeQueue) {
if (isLargeFile) {
if (deletedLargeFiles.get() == Long.MAX_VALUE) {
LOG.debug("Deleted more than Long.MAX_VALUE large files, reset counter to 0");
deletedLargeFiles.set(0L);
}
de... | 3.68 |
hadoop_LogExactlyOnce_debug | /**
* Log at DEBUG if nothing has been logged yet.
* @param format format string
* @param args arguments
*/
public void debug(String format, Object...args) {
if (!logged.getAndSet(true)) {
log.debug(format, args);
}
} | 3.68 |
hbase_ModifyNamespaceProcedure_prepareModify | /**
* Action before any real action of adding namespace.
*/
private boolean prepareModify(final MasterProcedureEnv env) throws IOException {
if (!getTableNamespaceManager(env).doesNamespaceExist(newNsDescriptor.getName())) {
setFailure("master-modify-namespace",
new NamespaceNotFoundException(newNsDescrip... | 3.68 |
flink_DataStream_writeToSocket | /**
* Writes the DataStream to a socket as a byte array. The format of the output is specified by a
* {@link SerializationSchema}.
*
* @param hostName host of the socket
* @param port port of the socket
* @param schema schema for serialization
* @return the closed DataStream
*/
@PublicEvolving
public DataStream... | 3.68 |
framework_ColorPickerSelect_getValue | /**
* Returns the selected value.
* <p>
* Value can be {@code null} if component is not yet initialized via
* {@link #initContent()}
*
* @see ColorPickerSelect#initContent()
*
* @return the selected color, may be {@code null}
*/
@Override
public Color getValue() {
if (grid == null) {
return null;
... | 3.68 |
morf_AbstractSqlDialectTest_testLower | /**
* Tests that LOWER functionality works.
*/
@Test
public void testLower() {
SelectStatement statement = new SelectStatement(lowerCase(new FieldReference("field1"))).from(new TableReference(
"schedule"));
String actual = testDialect.convertStatementToSQL(statement);
assertEquals("LowerCase script should... | 3.68 |
hadoop_ConnectionPool_getMinActiveRatio | /**
* Get the minimum ratio of active connections in this pool.
*
* @return Minimum ratio of active connections.
*/
protected float getMinActiveRatio() {
return this.minActiveRatio;
} | 3.68 |
pulsar_MultiTopicsConsumerImpl_subscribeAsync | // subscribe one more given topic, but already know the numberPartitions
CompletableFuture<Void> subscribeAsync(String topicName, int numberPartitions) {
TopicName topicNameInstance = getTopicName(topicName);
if (topicNameInstance == null) {
return FutureUtil.failedFuture(
new PulsarClie... | 3.68 |
hbase_AccessChecker_requireGlobalPermission | /**
* Checks that the user has the given global permission. The generated audit log message will
* contain context information for the operation being authorized, based on the given parameters.
* @param user Active user to which authorization checks should be applied
* @param request Request type
* @param p... | 3.68 |
framework_DataCommunicator_dropActiveData | /**
* Marks a data object identified by given key string to be dropped.
*
* @param key
* key string
*/
public void dropActiveData(String key) {
if (activeData.contains(key)) {
droppedData.add(key);
}
} | 3.68 |
hadoop_ReplicaInfo_getOriginalBytesReserved | /**
* Number of bytes originally reserved for this replica. The actual
* reservation is adjusted as data is written to disk.
*
* @return the number of bytes originally reserved for this replica.
*/
public long getOriginalBytesReserved() {
return 0;
} | 3.68 |
framework_FieldGroup_isBuffered | /**
* Checks the buffered mode for the bound fields.
* <p>
*
* @see #setBuffered(boolean) for more details on buffered mode
*
* @see Field#isBuffered()
* @return true if buffered mode is on, false otherwise
*
*/
public boolean isBuffered() {
return buffered;
} | 3.68 |
hbase_CleanerChore_newFileCleaner | /**
* A utility method to create new instances of LogCleanerDelegate based on the class name of the
* LogCleanerDelegate.
* @param className fully qualified class name of the LogCleanerDelegate
* @param conf used configuration
* @return the new instance
*/
private T newFileCleaner(String className, Configura... | 3.68 |
morf_XmlDataSetProducer_isEmptyDatabase | /**
* @see org.alfasoftware.morf.metadata.Schema#isEmptyDatabase()
*/
@Override
public boolean isEmptyDatabase() {
return xmlStreamProvider.availableStreamNames().isEmpty();
} | 3.68 |
hmily_XaLoadBalancerAutoConfiguration_xaLoadBalancerBeanPostProcessor | /**
* 注册 {@link XaLoadBalancerBeanPostProcessor} Bean.
*
* @return {@link XaLoadBalancerBeanPostProcessor} Bean
*/
@Bean
public static XaLoadBalancerBeanPostProcessor xaLoadBalancerBeanPostProcessor() {
return new XaLoadBalancerBeanPostProcessor();
} | 3.68 |
morf_AbstractSqlDialectTest_expectedRound | /**
* @return The expected SQL for rounding
*/
protected String expectedRound() {
return "SELECT ROUND(field1, 2) FROM " + tableName("schedule");
} | 3.68 |
framework_RpcDataProviderExtension_getActiveItemIds | /**
* Gets a collection copy of currently active item ids.
*
* @return collection of item ids
*/
public Collection<Object> getActiveItemIds() {
return new HashSet<Object>(activeItemMap.keySet());
} | 3.68 |
rocketmq-connect_WorkerSinkTask_closeMessageQueues | /**
* remove offset from currentOffsets/lastCommittedOffsets
* remove message from messageBatch
*
* @param queues
* @param lost
*/
private void closeMessageQueues(Set<MessageQueue> queues, boolean lost) {
if (!lost) {
commitOffsets(System.currentTimeMillis(), true, queues);
} else {
log.t... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.