name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hmily_HmilyColumnExtractor_extract | /**
* Get left value if left value of expression is column segment.
*
* @param expression expression segment
* @return column segment
*/
public static Optional<HmilyColumnSegment> extract(final HmilyExpressionSegment expression) {
if (expression instanceof HmilyBinaryOperationExpression && ((HmilyBinaryOperati... | 3.68 |
Activiti_DelegateHelper_getField | /**
* Returns the {@link FieldExtension} matching the provided 'fieldName' which
* is defined for the current activity of the provided
* {@link DelegateExecution}.
* <p>
* Returns null if no such {@link FieldExtension} can be found.
* <p>
* If the execution is currently being used for executing an
* {@link Exec... | 3.68 |
hudi_HoodieTimeline_getInflightInstant | /**
* Returns the inflight instant corresponding to the instant being passed. Takes care of changes in action names
* between inflight and completed instants (compaction <=> commit) and (logcompaction <==> deltacommit).
* @param instant Hoodie Instant
* @param metaClient Hoodie metaClient to fetch tableType and fil... | 3.68 |
flink_Either_setValue | /**
* Sets the encapsulated value to another value
*
* @param value the new value of the encapsulated value
*/
public void setValue(R value) {
this.value = value;
} | 3.68 |
framework_LayoutDependencyTree_setNeedsHorizontalLayout | /**
* Informs this LayoutDependencyTree that the horizontal size of a managed
* layout might have changed and it needs layouting, or that the layouting
* is no longer necessary. If there are blockers, layouting will be delayed
* and cannot be disabled before the blockers have been removed. Logs a
* warning if no d... | 3.68 |
dubbo_DubboBootstrap_reset | /**
* Try reset dubbo status for new instance.
*
* @deprecated For testing purposes only
*/
@Deprecated
public static void reset(boolean destroy) {
if (destroy) {
if (instance != null) {
instance.destroy();
instance = null;
}
FrameworkModel.destroyAll();
} els... | 3.68 |
framework_VTextArea_setWordWrap | /**
* Sets whether the words should wrap or not.
*
* @param wordWrap
* {@code true} if the words should wrap, {@code false} otherwise
*/
public void setWordWrap(boolean wordWrap) {
if (wordWrap == this.wordWrap) {
return;
}
if (wordWrap) {
getElement().removeAttribute("wrap")... | 3.68 |
hadoop_AbstractS3ACommitter_getUUID | /**
* The Job UUID, as passed in or generated.
* @return the UUID for the job.
*/
@VisibleForTesting
public final String getUUID() {
return uuid;
} | 3.68 |
hadoop_ManifestCommitterSupport_createJobSummaryFilename | /**
* Create the filename for a report from the jobID.
* @param jobId jobId
* @return filename for a report.
*/
public static String createJobSummaryFilename(String jobId) {
return String.format(SUMMARY_FILENAME_FORMAT, jobId);
} | 3.68 |
framework_BrowserInfo_requiresOverflowAutoFix | /**
* Indicates whether the browser might require juggling to properly update
* sizes inside elements with overflow: auto.
*
* @return <code>true</code> if the browser requires the workaround,
* otherwise <code>false</code>
*/
public boolean requiresOverflowAutoFix() {
return (getWebkitVersion() > 0 |... | 3.68 |
hbase_MetaTableAccessor_putsToMetaTable | /**
* Put the passed <code>ps</code> to the <code>hbase:meta</code> table.
* @param connection connection we're using
* @param ps Put to add to hbase:meta
*/
public static void putsToMetaTable(final Connection connection, final List<Put> ps)
throws IOException {
if (ps.isEmpty()) {
return;
}
try... | 3.68 |
hbase_HRegion_sync | /**
* Calls sync with the given transaction ID
* @param txid should sync up to which transaction
* @throws IOException If anything goes wrong with DFS
*/
private void sync(long txid, Durability durability) throws IOException {
if (this.getRegionInfo().isMetaRegion()) {
this.wal.sync(txid);
} else {
swit... | 3.68 |
morf_SchemaUtils_type | /**
* Create a column type.
*
* @param type The {@link DataType} of the field.
* @param width The field width.
* @param scale The field scale.
* @param nullable Whether the field should be nullable.
* @return The {@link ColumnType}.
*/
public static ColumnType type(DataType type, int width, int scale, boolean n... | 3.68 |
hbase_KeyValue_getTimestamp | /** Return the timestamp. */
long getTimestamp(final int keylength) {
int tsOffset = getTimestampOffset(keylength);
return Bytes.toLong(this.bytes, tsOffset);
} | 3.68 |
querydsl_AbstractPostgreSQLQuery_of | /**
* FOR UPDATE / FOR SHARE OF tables
*
* @param paths tables
* @return the current object
*/
public C of(RelationalPath<?>... paths) {
StringBuilder builder = new StringBuilder(" of ");
for (RelationalPath<?> path : paths) {
if (builder.length() > 4) {
builder.append(", ");
}
... | 3.68 |
morf_Function_floor | /**
* Helper method to create an instance of the "floor" SQL function, which will
* round the provided value down to an integer value.
* <p>
* Example : 3.2, 3.5 and 3.9 will all round to 3
* </p>
*
* @param expression the expression to evaluate
* @return an instance of the floor function
*/
public static Func... | 3.68 |
dubbo_ApplicationModel_initApplicationExts | // already synchronized in constructor
private void initApplicationExts() {
Set<ApplicationExt> exts = this.getExtensionLoader(ApplicationExt.class).getSupportedExtensionInstances();
for (ApplicationExt ext : exts) {
ext.initialize();
}
} | 3.68 |
flink_TypeSerializerSchemaCompatibility_compatibleAfterMigration | /**
* Returns a result that indicates that the new serializer can be used after migrating the
* written bytes, i.e. reading it with the old serializer and then writing it again with the new
* serializer.
*
* @return a result that indicates that the new serializer can be used after migrating the
* written byte... | 3.68 |
hbase_CacheConfig_isInMemory | /** Returns true if blocks in this file should be flagged as in-memory */
public boolean isInMemory() {
return this.inMemory;
} | 3.68 |
framework_Embedded_getCodetype | /**
* Gets the MIME-Type of the code.
*
* @return the MIME-Type of the code.
*/
public String getCodetype() {
return getState(false).codetype;
} | 3.68 |
flink_BlobUtils_getIncomingDirectory | /**
* Returns the BLOB service's directory for incoming (job-unrelated) files. The directory is
* created if it does not exist yet.
*
* @param storageDir storage directory used be the BLOB service
* @return the BLOB service's directory for incoming files
* @throws IOException if creating the directory fails
*/
s... | 3.68 |
graphhopper_WaySegmentParser_setRelationPreprocessor | /**
* @param relationPreprocessor callback function that receives OSM relations during the first pass
*/
public Builder setRelationPreprocessor(Consumer<ReaderRelation> relationPreprocessor) {
waySegmentParser.relationPreprocessor = relationPreprocessor;
return this;
} | 3.68 |
hbase_HRegion_getEffectiveDurability | /**
* Returns effective durability from the passed durability and the table descriptor.
*/
private Durability getEffectiveDurability(Durability d) {
return d == Durability.USE_DEFAULT ? this.regionDurability : d;
} | 3.68 |
streampipes_EpProperties_longEp | /**
* Creates a new primitive property of type integer and the provided domain property.
*
* @param label A human-readable identifier of the property presented to users in the StreamPipes UI.
* If you do not want to have a label besides the runtime name, use
* {... | 3.68 |
hadoop_ZKPathDumper_toString | /**
* Trigger the recursive registry dump.
* @return a string view of the registry
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ZK tree for ").append(root).append('\n');
expand(builder, root, 1);
return builder.toString();
} | 3.68 |
hbase_OrderedBytes_isNumericInfinite | /**
* Return true when the next encoded value in {@code src} uses Numeric encoding and is
* {@code Infinite}, false otherwise.
*/
public static boolean isNumericInfinite(PositionedByteRange src) {
byte x = (-1 == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
return NEG_INF == x || POS_I... | 3.68 |
zxing_MatrixUtil_findMSBSet | // Return the position of the most significant bit set (to one) in the "value". The most
// significant bit is position 32. If there is no bit set, return 0. Examples:
// - findMSBSet(0) => 0
// - findMSBSet(1) => 1
// - findMSBSet(255) => 8
static int findMSBSet(int value) {
return 32 - Integer.numberOfLeadingZeros(... | 3.68 |
flink_RequestJobsWithIDsOverview_readResolve | /** Preserve the singleton property by returning the singleton instance */
private Object readResolve() {
return INSTANCE;
} | 3.68 |
querydsl_MapExpressionBase_isEmpty | /**
* Create a {@code this.isEmpty()} expression
*
* @return this.isEmpty()
*/
public final BooleanExpression isEmpty() {
if (empty == null) {
empty = Expressions.booleanOperation(Ops.MAP_IS_EMPTY, mixin);
}
return empty;
} | 3.68 |
zxing_LuminanceSource_isRotateSupported | /**
* @return Whether this subclass supports counter-clockwise rotation.
*/
public boolean isRotateSupported() {
return false;
} | 3.68 |
flink_InputFormatTableSource_isBounded | /** Always returns true which indicates this is a bounded source. */
@Override
public final boolean isBounded() {
return true;
} | 3.68 |
graphhopper_GHDirectory_getDefaultType | /**
* This method returns the default DAType of the specified DataAccess (as string). If preferInts is true then this
* method returns e.g. RAM_INT if the type of the specified DataAccess is RAM.
*/
public DAType getDefaultType(String dataAccess, boolean preferInts) {
DAType type = getDefault(dataAccess, typeFal... | 3.68 |
flink_PlanNode_addOutgoingChannel | /**
* Adds a channel to a successor node to this node.
*
* @param channel The channel to the successor.
*/
public void addOutgoingChannel(Channel channel) {
this.outChannels.add(channel);
} | 3.68 |
hudi_AbstractTableFileSystemView_getLatestBaseFile | /**
* Get Latest base file for a partition and file-Id.
*/
@Override
public final Option<HoodieBaseFile> getLatestBaseFile(String partitionStr, String fileId) {
try {
readLock.lock();
String partitionPath = formatPartitionKey(partitionStr);
ensurePartitionLoadedCorrectly(partitionPath);
if (isFileGr... | 3.68 |
hudi_HoodieStreamer_sync | /**
* Main method to start syncing.
*/
public void sync() throws Exception {
if (bootstrapExecutor.isPresent()) {
LOG.info("Performing bootstrap. Source=" + bootstrapExecutor.get().getBootstrapConfig().getBootstrapSourceBasePath());
bootstrapExecutor.get().execute();
} else {
ingestionService.ifPresen... | 3.68 |
morf_SqlDialect_getUpdateStatementSetFieldSql | /**
* Returns the SET clause for an SQL UPDATE statement based on the
* {@link List} of {@link AliasedField}s provided.
*
* @param fields The {@link List} of {@link AliasedField}s to create the SET
* statement from
* @return The SET clause as a string
*/
protected String getUpdateStatementSetFieldSql(Li... | 3.68 |
framework_ConnectorTracker_getConnectorAndParentInfo | /**
* Returns {@link #getConnectorString(ClientConnector)} for the connector
* and its parent (if it has a parent).
*
* @param connector
* The connector
* @return A string describing the connector and its parent
*/
private String getConnectorAndParentInfo(ClientConnector connector) {
String messag... | 3.68 |
querydsl_EnumExpression_nullif | /**
* Create a {@code nullif(this, other)} expression
*
* @param other
* @return nullif(this, other)
*/
@Override
public EnumExpression<T> nullif(T other) {
return nullif(ConstantImpl.create(other));
} | 3.68 |
framework_VCalendar_isEventResizeAllowed | /**
* Is resizing an event allowed.
*/
public boolean isEventResizeAllowed() {
return eventResizeAllowed;
} | 3.68 |
zilla_HpackContext_staticIndex | /*
* Index in static table for the name. There aren't many entries, so will use
* the length and last byte in the name to look up the entry.
*
* @return index in static table if present
* -1 otherwise
*/
private static int staticIndex(DirectBuffer name)
{
switch (name.capacity())
{
case 3: ret... | 3.68 |
flink_OutputFormatBase_close | /** Close the format waiting for pending writes and reports errors. */
@Override
public final void close() throws IOException {
checkAsyncErrors();
flush();
checkAsyncErrors();
postClose();
} | 3.68 |
flink_StaticFileServerHandler_setContentTypeHeader | /**
* Sets the content type header for the HTTP Response.
*
* @param response HTTP response
* @param file file to extract content type
*/
public static void setContentTypeHeader(HttpResponse response, File file) {
String mimeType = MimeTypes.getMimeTypeForFileName(file.getName());
String mimeFinal = mimeTy... | 3.68 |
hadoop_NMContainerTokenSecretManager_retrievePassword | /**
* Override of this is to validate ContainerTokens generated by using
* different {@link MasterKey}s.
*/
@Override
public synchronized byte[] retrievePassword(
ContainerTokenIdentifier identifier) throws SecretManager.InvalidToken {
int keyId = identifier.getMasterKeyId();
MasterKeyData masterKeyToUse = ... | 3.68 |
hbase_RequestConverter_buildCreateTableRequest | /**
* Creates a protocol buffer CreateTableRequest
* @return a CreateTableRequest
*/
public static CreateTableRequest buildCreateTableRequest(final TableDescriptor tableDescriptor,
final byte[][] splitKeys, final long nonceGroup, final long nonce) {
CreateTableRequest.Builder builder = CreateTableRequest.newBuil... | 3.68 |
dubbo_AbstractReferenceConfig_isGeneric | /**
* @deprecated Replace to {@link AbstractReferenceConfig#getGeneric()}
*/
@Deprecated
@Parameter(excluded = true, attribute = false)
public Boolean isGeneric() {
return this.generic != null ? ProtocolUtils.isGeneric(generic) : null;
} | 3.68 |
hbase_TableQuotaSnapshotStore_getQuotaForTable | /**
* Fetches the table quota. Visible for mocking/testing.
*/
Quotas getQuotaForTable(TableName table) throws IOException {
return QuotaTableUtil.getTableQuota(conn, table);
} | 3.68 |
morf_SchemaBean_viewNames | /**
* @see org.alfasoftware.morf.metadata.Schema#viewNames()
*/
@Override
public Collection<String> viewNames() {
// Implemented like this rather than views.keySet() to retain case
Set<String> names = new HashSet<>();
for (View view : views.values()) {
names.add(view.getName());
}
return names;
} | 3.68 |
hbase_MultiTableSnapshotInputFormatImpl_restoreSnapshots | /**
* Restore each (snapshot name, restore directory) pair in snapshotToDir
* @param conf configuration to restore with
* @param snapshotToDir mapping from snapshot names to restore directories
* @param fs filesystem to do snapshot restoration on
*/
public void restoreSnapshots(Configuration co... | 3.68 |
hudi_StreamerUtil_instantTimeDiffSeconds | /**
* Returns the time interval in seconds between the given instant time.
*/
public static long instantTimeDiffSeconds(String newInstantTime, String oldInstantTime) {
try {
long newTimestamp = HoodieActiveTimeline.parseDateFromInstantTime(newInstantTime).getTime();
long oldTimestamp = HoodieActiveTimeline.... | 3.68 |
flink_HashPartition_finalizeProbePhase | /**
* @param keepUnprobedSpilledPartitions If true then partitions that were spilled but received
* no further probe requests will be retained; used for build-side outer joins.
* @return The number of write-behind buffers reclaimable after this method call.
* @throws IOException
*/
public int finalizeProbePhas... | 3.68 |
hadoop_FSBuilderSupport_getLong | /**
* Get a long value with resilience to unparseable values.
* @param key key to log
* @param defVal default value
* @return long value
*/
public long getLong(String key, long defVal) {
final String v = options.getTrimmed(key, "");
if (v.isEmpty()) {
return defVal;
}
try {
return options.getLong(k... | 3.68 |
hbase_HRegionFileSystem_getRegionDir | /** Returns {@link Path} to the region directory. */
public Path getRegionDir() {
return regionDir;
} | 3.68 |
hadoop_AbstractS3ACommitter_abortPendingUploads | /**
* Abort all pending uploads in the list.
* @param commitContext commit context
* @param pending pending uploads
* @param suppressExceptions should exceptions be suppressed?
* @param deleteRemoteFiles should remote files be deleted?
* @throws IOException any exception raised
*/
protected void abortPendingUplo... | 3.68 |
hadoop_PublishedConfiguration_shallowCopy | /**
* This makes a copy without the nested content -so is suitable
* for returning as part of the list of a parent's values
* @return the copy
*/
public PublishedConfiguration shallowCopy() {
PublishedConfiguration that = new PublishedConfiguration();
that.description = this.description;
that.updated = this.u... | 3.68 |
hadoop_IdentityTransformer_transformUserOrGroupForSetRequest | /**
* Perform Identity transformation when setting owner on a path.
* There are four possible input:
* 1.short name; 2.$superuser; 3.Fully qualified name; 4. principal id.
* <pre>
* short name could be transformed to:
* - A service principal id or $superuser, if short name belongs a daemon service
* stat... | 3.68 |
hmily_HmilyRepositoryFacade_createHmilyTransaction | /**
* Create hmily transaction string.
*
* @param hmilyTransaction the hmily transaction
*/
public void createHmilyTransaction(final HmilyTransaction hmilyTransaction) {
checkRows(hmilyRepository.createHmilyTransaction(hmilyTransaction));
} | 3.68 |
framework_TouchScrollDelegate_stopScrolling | /**
* Forces the scroll delegate to cancels scrolling process. Can be called by
* users if they e.g. decide to handle touch event by themselves after all
* (e.g. a pause after touch start before moving touch -> interpreted as
* long touch/click or drag start).
*/
public void stopScrolling() {
handlerRegistrati... | 3.68 |
flink_SyntaxHighlightStyle_getHintStyle | /**
* Returns the style for a SQL hint, such as {@literal /*+ This is a hint *}{@literal /}.
*
* @return Style for SQL hints
*/
public AttributedStyle getHintStyle() {
return hintStyle;
} | 3.68 |
hadoop_Paths_addUUID | /**
* Insert the UUID to a path if it is not there already.
* If there is a trailing "." in the prefix after the last slash, the
* UUID is inserted before it with a "-" prefix; otherwise appended.
*
* Examples:
* <pre>
* /example/part-0000 ==> /example/part-0000-0ab34
* /example/part-0001.gz.csv ==>... | 3.68 |
hadoop_ValueAggregatorMapper_map | /**
* the map function. It iterates through the value aggregator descriptor
* list to generate aggregation id/value pairs and emit them.
*/
public void map(K1 key, V1 value,
Context context) throws IOException, InterruptedException {
Iterator<?> iter =
ValueAggregatorJobBase.aggregatorDescriptorList.... | 3.68 |
dubbo_ReactorClientCalls_manyToMany | /**
* Implements a stream -> stream call as Flux -> Flux
*
* @param invoker invoker
* @param requestFlux the flux with request
* @param methodDescriptor the method descriptor
* @return the flux with response
*/
public static <TRequest, TResponse, TInvoker> Flux<TResponse> manyToMany(
Invoker<TInvoker> in... | 3.68 |
flink_EnvironmentSettings_withConfiguration | /** Add extra configuration to {@link EnvironmentSettings}. */
public Builder withConfiguration(Configuration configuration) {
this.configuration.addAll(configuration);
return this;
} | 3.68 |
flink_CatalogManager_alterDatabase | /**
* Modify an existing database.
*
* @param catalogName Name of the catalog for database
* @param databaseName Name of the database to be dropped
* @param newDatabase The new database definition
* @param ignoreIfNotExists Flag to specify behavior when the given database does not exist: if
* set to false, t... | 3.68 |
hadoop_AbfsCountersImpl_lookupMetric | /**
* Look up a Metric from registered set.
*
* @param name name of metric.
* @return the metric or null.
*/
private MutableMetric lookupMetric(String name) {
return getRegistry().get(name);
} | 3.68 |
morf_Function_max | /**
* Helper method to create an instance of the "maximum" SQL function.
*
* @param fieldToEvaluate the field to evaluate in the maximum function. This can be any expression resulting in a single column of data.
* @return an instance of the maximum function
*/
public static Function max(AliasedField fieldToEvaluat... | 3.68 |
hudi_FlinkClientUtil_getHadoopConf | /**
* Returns the hadoop configuration with possible hadoop conf paths.
* E.G. the configurations under path $HADOOP_CONF_DIR and $HADOOP_HOME.
*/
public static org.apache.hadoop.conf.Configuration getHadoopConf() {
// create hadoop configuration with hadoop conf directory configured.
org.apache.hadoop.conf.Conf... | 3.68 |
flink_FlinkImageBuilder_build | /** Build the image. */
public ImageFromDockerfile build() throws ImageBuildException {
sanityCheck();
final String finalImageName = imageNamePrefix + "-" + imageNameSuffix;
try {
if (baseImage == null) {
baseImage = FLINK_BASE_IMAGE_BUILD_NAME;
if (flinkDist == null) {
... | 3.68 |
morf_SqlDialect_appendJoins | /**
* appends joins clauses to the result
*
* @param result joins will be appended here
* @param stmt statement with joins clauses
* @param innerJoinKeyword The keyword for INNER JOIN
* @param <T> The type of {@link AbstractSelectStatement}
*/
protected <T extends AbstractSelectStatement<T>> void appendJoins(Str... | 3.68 |
graphhopper_CustomModelParser_getInterface | /**
* @return the interface as string of the provided EncodedValue, e.g. IntEncodedValue (only interface) or
* BooleanEncodedValue (first interface). For StringEncodedValue we return IntEncodedValue to return the index
* instead of the String for faster comparison.
*/
private static String getInterface(EncodedValue... | 3.68 |
shardingsphere-elasticjob_ShardingService_hasShardingInfoInOfflineServers | /**
* Query has sharding info in offline servers or not.
*
* @return has sharding info in offline servers or not
*/
public boolean hasShardingInfoInOfflineServers() {
List<String> onlineInstances = jobNodeStorage.getJobNodeChildrenKeys(InstanceNode.ROOT);
int shardingTotalCount = configService.load(true).g... | 3.68 |
dubbo_RpcContext_set | /**
* set value.
*
* @param key
* @param value
* @return context
*/
public RpcContext set(String key, Object value) {
newRpcContext.set(key, value);
return this;
} | 3.68 |
flink_DataStreamSinkProvider_consumeDataStream | /**
* Consumes the given Java {@link DataStream} and returns the sink transformation {@link
* DataStreamSink}.
*
* @deprecated Use {@link DataStreamSinkProvider#consumeDataStream(ProviderContext, DataStream)}
* and correctly set a unique identifier for each data stream transformation.
*/
@Deprecated
default D... | 3.68 |
flink_SkipListUtils_helpSetPrevAndNextNode | /**
* Set the previous node and the next node of the given node at the given level. The level must
* be positive.
*
* @param node the node.
* @param prevNode the previous node to set.
* @param nextNode the next node to set.
* @param level the level to find the next node.
* @param spaceAllocator the space alloca... | 3.68 |
zxing_MonochromeRectangleDetector_blackWhiteRange | /**
* Computes the start and end of a region of pixels, either horizontally or vertically, that could
* be part of a Data Matrix barcode.
*
* @param fixedDimension if scanning horizontally, this is the row (the fixed vertical location)
* where we are scanning. If scanning vertically it's the column, the fixed hor... | 3.68 |
AreaShop_RentRegion_getFormattedMoneyBackAmount | /**
* Get the formatted string of the amount of the moneyBack amount.
* @return String with currency symbols and proper fractional part
*/
public String getFormattedMoneyBackAmount() {
return Utils.formatCurrency(getMoneyBackAmount());
} | 3.68 |
hadoop_FederationPolicyInitializationContext_setFederationSubclusterResolver | /**
* Setter for the {@link SubClusterResolver}.
*
* @param federationSubclusterResolver the {@link SubClusterResolver} to be
* used for initialization.
*/
public void setFederationSubclusterResolver(
SubClusterResolver federationSubclusterResolver) {
this.federationSubclusterResolver = federationSu... | 3.68 |
framework_TypeDataStore_isNoLayoutProperty | /**
* Checks whether the provided property is annotated with {@link NoLayout}.
*
* @param property
* the property to check
*
* @since 7.4
*
* @return <code>true</code> if the property has a NoLayout annotation;
* otherwise <code>false</code>
*/
public static boolean isNoLayoutProperty(Prope... | 3.68 |
flink_AsynchronousBlockWriter_getReturnQueue | /**
* Gets the queue in which the memory segments are queued after the asynchronous write is
* completed.
*
* @return The queue with the written memory segments.
*/
@Override
public LinkedBlockingQueue<MemorySegment> getReturnQueue() {
return this.returnSegments;
} | 3.68 |
hudi_BitCaskDiskMap_sizeOfFileOnDiskInBytes | /**
* Number of bytes spilled to disk.
*/
@Override
public long sizeOfFileOnDiskInBytes() {
return filePosition.get();
} | 3.68 |
hadoop_FederationStateStoreFacade_storeNewToken | /**
* The Router Supports Store RMDelegationTokenIdentifier{@link RMDelegationTokenIdentifier}.
*
* @param identifier delegation tokens from the RM.
* @param renewDate renewDate.
* @param tokenInfo tokenInfo.
* @throws YarnException if the call to the state store is unsuccessful.
* @throws IOException An IO Erro... | 3.68 |
framework_VDateField_getResolutions | /**
* Returns all available resolutions for the field in the ascending order
* (which is the same as order of enumeration ordinals).
* <p>
* The method uses {@link #doGetResolutions()} to make sure that the order
* is the correct one.
*
* @see #doGetResolutions()
*
* @return stream of all available resolutions... | 3.68 |
framework_HierarchyMapper_collapse | /**
* Collapses the given item.
*
* @param item
* the item to collapse
* @param position
* the index of the item
*
* @return range of rows removed by collapsing the item
*/
public Range collapse(T item, Integer position) {
Range removedRows = Range.emptyRange();
if (isExpanded(ite... | 3.68 |
morf_H2DatabaseInspector_inspect | /**
* @see org.alfasoftware.morf.diagnostics.DatabaseInspector#inspect()
*/
@Override
public void inspect() {
if (connectionResources instanceof AbstractConnectionResources &&
"H2".equals(connectionResources.getDatabaseType())) {
try {
log.info("Launching H2 database inspector...");
Server.sta... | 3.68 |
AreaShop_FileManager_saveGroupsNow | /**
* Save the groups file to disk synchronously.
*/
public void saveGroupsNow() {
AreaShop.debug("saveGroupsNow() done");
saveGroupsRequired = false;
try {
groupsConfig.save(groupsPath);
} catch(IOException e) {
AreaShop.warn("Groups file could not be saved: " + groupsPath);
}
} | 3.68 |
flink_Bucket_getNew | /**
* Creates a new empty {@code Bucket}.
*
* @param subtaskIndex the index of the subtask creating the bucket.
* @param bucketId the identifier of the bucket, as returned by the {@link BucketAssigner}.
* @param bucketPath the path to where the part files for the bucket will be written to.
* @param initialPartCou... | 3.68 |
hadoop_AbfsInputStream_reset | /**
* Not supported by this stream. Throws {@link UnsupportedOperationException}
*/
@Override
public synchronized void reset() throws IOException {
throw new UnsupportedOperationException("mark()/reset() not supported on this stream");
} | 3.68 |
hbase_MasterObserver_postSwitchExceedThrottleQuota | /**
* Called after switching exceed throttle quota state.
* @param ctx the coprocessor instance's environment
* @param oldValue the previously exceed throttle quota value
* @param newValue the newly exceed throttle quota value
*/
default void postSwitchExceedThrottleQuota(
final ObserverContext<MasterCoproc... | 3.68 |
flink_MemorySegment_putDouble | /**
* Writes the given double-precision floating-point value (64bit, 8 bytes) to the given position
* in the system's native byte order. This method offers the best speed for double writing and
* should be used unless a specific byte order is required. In most cases, it suffices to know
* that the byte order in whi... | 3.68 |
hadoop_DynamicIOStatistics_addGaugeFunction | /**
* add a mapping of a key to a gauge function.
* @param key the key
* @param eval the evaluator
*/
void addGaugeFunction(String key, Function<String, Long> eval) {
gauges.addFunction(key, eval);
} | 3.68 |
hudi_HFileBootstrapIndex_getPartitionKey | /**
* Returns partition-key to be used in HFile.
* @param partition Partition-Path
* @return
*/
private static String getPartitionKey(String partition) {
return getKeyValueString(PARTITION_KEY_PREFIX, partition);
} | 3.68 |
hbase_EnableTableProcedure_setTableStateToEnabling | /**
* Mark table state to Enabling
* @param env MasterProcedureEnv
* @param tableName the target table
*/
protected static void setTableStateToEnabling(final MasterProcedureEnv env,
final TableName tableName) throws IOException {
// Set table disabling flag up in zk.
LOG.info("Attempting to enable the t... | 3.68 |
rocketmq-connect_ClusterConfigState_taskCount | /**
* Get the number of tasks assigned for the given connector.
*
* @param connectorName name of the connector to look up tasks for
* @return the number of tasks
*/
public int taskCount(String connectorName) {
Integer count = connectorTaskCounts.get(connectorName);
return count == null ? 0 : count;
} | 3.68 |
flink_WatermarkSpec_getRowtimeAttribute | /**
* Returns the name of a rowtime attribute.
*
* <p>The referenced attribute must be present in the {@link ResolvedSchema} and must be of
* {@link TimestampType}.
*/
public String getRowtimeAttribute() {
return rowtimeAttribute;
} | 3.68 |
hadoop_TimestampGenerator_currentTime | /**
* Returns the current wall clock time in milliseconds, multiplied by the
* required precision.
*
* @return current timestamp.
*/
public long currentTime() {
// We want to align cell timestamps with current time.
// cell timestamps are not be less than
// System.currentTimeMillis() * TS_MULTIPLIER.
retu... | 3.68 |
hbase_CommonFSUtils_isRecoveredEdits | /**
* Checks if the given path is the one with 'recovered.edits' dir.
* @param path must not be null
* @return True if we recovered edits
*/
public static boolean isRecoveredEdits(Path path) {
return path.toString().contains(HConstants.RECOVERED_EDITS_DIR);
} | 3.68 |
graphhopper_GHDirectory_configure | /**
* Configure the DAType (specified by the value) of a single DataAccess object (specified by the key). For "MMAP" you
* can prepend "preload." to the name and specify a percentage which preloads the DataAccess into physical memory of
* the specified percentage (only applied for load, not for import).
* As keys c... | 3.68 |
zxing_PDF417HighLevelEncoder_encodeText | /**
* Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E),
* chapter 4.4.2.
*
* @param input the input
* @param startpos the start position within the message
* @param count the number of characters to encode
* @param sb receives the encoded... | 3.68 |
morf_AbstractSqlDialectTest_expectedSqlStatementFormat | /**
* Provides the tests for the correct format expected.
* This method can be overridden for dialect specific formatting.
*/
protected void expectedSqlStatementFormat() {
// When
String statement1 = testDialect.formatSqlStatement("END;");
String statement2 = testDialect.formatSqlStatement("test");
// Then
... | 3.68 |
hadoop_AbfsIoUtils_dumpHeadersToDebugLog | /**
* Dump the headers of a request/response to the log at DEBUG level.
* @param origin header origin for log
* @param headers map of headers.
*/
public static void dumpHeadersToDebugLog(final String origin,
final Map<String, List<String>> headers) {
if (LOG.isDebugEnabled()) {
LOG.debug("{}", origin);
... | 3.68 |
framework_TouchScrollDelegate_setElements | /**
* Registers the given elements as scrollable, removing previously
* registered scrollables from this handler.
*
* @param scrollables
* The elements that should be scrollable
*/
public void setElements(Element... scrollables) {
if (requiresDelegate()) {
for (Element e : delegate.scrollab... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.