name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
pulsar_OwnershipCache_tryAcquiringOwnership | /**
* Method to get the current owner of the <code>NamespaceBundle</code>
* or set the local broker as the owner if absent.
*
* @param bundle
* the <code>NamespaceBundle</code>
* @return The ephemeral node data showing the current ownership info in <code>ZooKeeper</code>
* @throws Exception
*/
public... | 3.68 |
hbase_LogLevel_doSetLevel | /**
* Send HTTP request to set log level.
* @throws HadoopIllegalArgumentException if arguments are invalid.
* @throws Exception if unable to connect
*/
private void doSetLevel() throws Exception {
process(protocol + "://" + hostName + "/logLevel?log=" + className + "&level=" + level);
} | 3.68 |
rocketmq-connect_RmqSourceReplicator_ensureTargetTopic | /**
* ensure target topic eixst. if target topic does not exist, ensureTopic will create target topic on target
* cluster, with same TopicConfig but using target topic name. any exception will be caught and then throw
* IllegalStateException.
*
* @param srcTopic
* @param targetTopic
* @throws RemotingException
... | 3.68 |
hadoop_OBSFileSystem_getCopyPartSize | /**
* Return copy part size.
*
* @return copy part size
*/
long getCopyPartSize() {
return copyPartSize;
} | 3.68 |
hadoop_SchedulerNodeReport_getAvailableResource | /**
* @return the amount of resources currently available on the node
*/
public Resource getAvailableResource() {
return avail;
} | 3.68 |
hadoop_OBSCommonUtils_newPutObjectRequest | /**
* Create a {@link PutObjectRequest} request. The metadata is assumed to have
* been configured with the size of the operation.
*
* @param owner the owner OBSFileSystem instance
* @param key key of object
* @param metadata metadata header
* @param inputStream source data.
* @return the reque... | 3.68 |
flink_TaskStateSnapshot_isTaskFinished | /** Returns whether all the operators of the task have called finished methods. */
public boolean isTaskFinished() {
return isTaskFinished;
} | 3.68 |
Activiti_BpmnParser_createParse | /**
* Creates a new {@link BpmnParse} instance that can be used to parse only one BPMN 2.0 process definition.
*/
public BpmnParse createParse() {
return bpmnParseFactory.createBpmnParse(this);
} | 3.68 |
flink_TypeInformation_isSortKeyType | /**
* Checks whether this type can be used as a key for sorting. The order produced by sorting this
* type must be meaningful.
*/
@PublicEvolving
public boolean isSortKeyType() {
return isKeyType();
} | 3.68 |
hadoop_BlockBlobAppendStream_addBlockUploadCommand | /**
* Prepare block upload command and queue the command in thread pool executor.
*/
private synchronized void addBlockUploadCommand() throws IOException {
maybeThrowFirstError();
if (blobExist && lease.isFreed()) {
throw new AzureException(String.format(
"Attempting to upload a block on blob : %s "... | 3.68 |
hbase_ReusableStreamGzipCodec_writeShort | /** re-implement because the relative method in jdk is invisible */
private void writeShort(int paramInt1, byte[] paramArrayOfByte, int paramInt2)
throws IOException {
paramArrayOfByte[paramInt2] = (byte) (paramInt1 & 0xFF);
paramArrayOfByte[(paramInt2 + 1)] = (byte) (paramInt1 >> 8 & 0xFF);
} | 3.68 |
hbase_AuthUtil_isGroupPrincipal | /**
* Returns whether or not the given name should be interpreted as a group principal. Currently
* this simply checks if the name starts with the special group prefix character ("@").
*/
@InterfaceAudience.Private
public static boolean isGroupPrincipal(String name) {
return name != null && name.startsWith(GROUP_P... | 3.68 |
framework_DefaultErrorHandler_findComponent | /**
* Finds the nearest component by traversing upwards in the hierarchy. If
* connector is a Component, that Component is returned. Otherwise, looks
* upwards in the hierarchy until it finds a {@link Component}.
*
* @return A Component or null if no component was found
*/
public static Component findComponent(Co... | 3.68 |
hibernate-validator_ValidatorImpl_getValueContextForPropertyValidation | /**
* Returns a value context pointing to the given property path relative to the specified root class for a given
* value.
*
* @param validationContext The validation context.
* @param propertyPath The property path for which constraints have to be collected.
*
* @return Returns an instance of {@code ValueConte... | 3.68 |
querydsl_JTSGeometryExpression_difference | /**
* Returns a geometric object that represents the Point
* set difference of this geometric object with anotherGeometry.
*
* @param geometry other geometry
* @return difference between this and the other geometry
*/
public JTSGeometryExpression<Geometry> difference(Expression<? extends Geometry> geometry) {
... | 3.68 |
zilla_HttpServerFactory_serverHeader | // Checks if response has server header
private void serverHeader(
HttpHeaderFW header)
{
serverHeader |= header.name().value().equals(context.nameBuffer(54));
} | 3.68 |
morf_MergeStatement_from | /**
* Specifies the select statement to use as a source of the data.
*
* @param statement the source statement.
* @return a statement with the changes applied.
*/
public MergeStatement from(SelectStatement statement) {
if (AliasedField.immutableDslEnabled()) {
return shallowCopy().from(statement).build();
... | 3.68 |
Activiti_Activiti_inboundGateway | /**
* This is the component that you'll use in your Spring Integration
* {@link org.springframework.integration.dsl.IntegrationFlow}.
*/
public static ActivitiInboundGateway inboundGateway(ProcessEngine processEngine, String... varsToPreserve) {
return new ActivitiInboundGateway(processEngine, varsToPreserve);
} | 3.68 |
pulsar_BrokerInterceptor_onFilter | /**
* The interception of web processing, as same as `Filter.onFilter`.
* So In this method, we must call `chain.doFilter` to continue the chain.
*/
default void onFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
// Just continue the chain... | 3.68 |
hbase_RegionServerAccounting_isAboveHighWaterMark | /**
* Return the FlushType if we are above the memstore high water mark
* @return the FlushType
*/
public FlushType isAboveHighWaterMark() {
// for onheap memstore we check if the global memstore size and the
// global heap overhead is greater than the global memstore limit
if (memType == MemoryType.HEAP) {
... | 3.68 |
flink_PrioritizedDeque_poll | /**
* Polls the first priority element or non-priority element if the former does not exist.
*
* @return the first element or null.
*/
@Nullable
public T poll() {
final T polled = deque.poll();
if (polled != null && numPriorityElements > 0) {
numPriorityElements--;
}
return polled;
} | 3.68 |
framework_VaadinSession_getPendingAccessQueue | /**
* Gets the queue of tasks submitted using {@link #access(Runnable)}. It is
* safe to call this method and access the returned queue without holding
* the {@link #lock() session lock}.
*
* @since 7.1
*
* @return the queue of pending access tasks
*/
public Queue<FutureAccess> getPendingAccessQueue() {
ret... | 3.68 |
hudi_SparkInternalSchemaConverter_convertDoubleType | /**
* Convert double type to other Type.
* Now only support Double -> Decimal/String
* TODO: support more types
*/
private static boolean convertDoubleType(WritableColumnVector oldV, WritableColumnVector newV, DataType newType, int len) {
if (newType instanceof DecimalType || newType instanceof StringType) {
... | 3.68 |
querydsl_ExpressionUtils_all | /**
* Create a {@code all col} expression
*
* @param col subquery expression
* @return all col
*/
@SuppressWarnings("unchecked")
public static <T> Expression<T> all(SubQueryExpression<? extends T> col) {
return new OperationImpl<T>(col.getType(), Ops.QuantOps.ALL, Collections.singletonList(col));
} | 3.68 |
flink_StaticResultProvider_rowToInternalRow | /** This function supports only String, long, int and boolean fields. */
@VisibleForTesting
static RowData rowToInternalRow(Row row) {
Object[] values = new Object[row.getArity()];
for (int i = 0; i < row.getArity(); i++) {
Object value = row.getField(i);
if (value == null) {
values[... | 3.68 |
hadoop_ConfiguredNodeLabels_setLabelsByQueue | /**
* Set node labels for a specific queue.
* @param queuePath path of the queue
* @param nodeLabels configured node labels to set
*/
public void setLabelsByQueue(
String queuePath, Collection<String> nodeLabels) {
configuredNodeLabelsByQueue.put(queuePath, new HashSet<>(nodeLabels));
} | 3.68 |
flink_KeyedStream_sideOutputLeftLateData | /**
* Send late arriving left-side data to the side output identified by the given {@link
* OutputTag}. Data is considered late after the watermark
*/
@PublicEvolving
public IntervalJoined<IN1, IN2, KEY> sideOutputLeftLateData(OutputTag<IN1> outputTag) {
outputTag = left.getExecutionEnvironment().clean(outputTag... | 3.68 |
hadoop_ExternalSPSBeanMetrics_close | /**
* Unregister the JMX interfaces.
*/
public void close() {
if (externalSPSBeanName != null) {
MBeans.unregister(externalSPSBeanName);
externalSPSBeanName = null;
}
} | 3.68 |
hadoop_XException_getError | /**
* Returns the error code of the exception.
*
* @return the error code of the exception.
*/
public ERROR getError() {
return error;
} | 3.68 |
hbase_HDFSBlocksDistribution_getBlocksLocalWithSsdWeight | /**
* Get the blocks local weight with ssd for a given host
* @param host the host name
* @return the blocks local with ssd weight of the given host
*/
public long getBlocksLocalWithSsdWeight(String host) {
return getBlocksLocalityWeightInternal(host, HostAndWeight::getWeightForSsd);
} | 3.68 |
hadoop_StageConfig_withStageEventCallbacks | /**
* Set handler for stage entry events..
* @param value new value
* @return this
*/
public StageConfig withStageEventCallbacks(StageEventCallbacks value) {
checkOpen();
enterStageEventHandler = value;
return this;
} | 3.68 |
flink_MapView_iterator | /**
* Returns an iterator over all entries of the map view.
*
* @return An iterator over all the mappings in the map.
* @throws Exception Thrown if the system cannot access the map.
*/
public Iterator<Map.Entry<K, V>> iterator() throws Exception {
return map.entrySet().iterator();
} | 3.68 |
flink_UnsortedGrouping_minBy | /**
* Applies a special case of a reduce transformation (minBy) on a grouped {@link DataSet}.
*
* <p>The transformation consecutively calls a {@link ReduceFunction} until only a single
* element remains which is the result of the transformation. A ReduceFunction combines two
* elements into one new element of the ... | 3.68 |
framework_ConnectorTracker_markClean | /**
* Mark the connector as clean.
*
* @param connector
* The connector that should be marked clean.
*/
public void markClean(ClientConnector connector) {
if (fineLogging && dirtyConnectors.contains(connector)) {
getLogger().log(Level.FINE, "{0} is no longer dirty",
getConnec... | 3.68 |
hudi_HoodieRecord_read | /**
* NOTE: This method is declared final to make sure there's no polymorphism and therefore
* JIT compiler could perform more aggressive optimizations
*/
@Override
public final void read(Kryo kryo, Input input) {
this.key = kryo.readObjectOrNull(input, HoodieKey.class);
this.operation = kryo.readObjectOrN... | 3.68 |
morf_SpreadsheetDataSetProducer_createTranslationRecord | /**
* Creates the collection of translation records from a given set of
* translations.
*
* @param id ID of the translation record
* @param translation Translation string to create
* @return the record representing the translation
*/
private Record createTranslationRecord(final int id, final String translation) ... | 3.68 |
graphhopper_PrepareLandmarks_setAreaIndex | /**
* @see LandmarkStorage#setAreaIndex(AreaIndex)
*/
public PrepareLandmarks setAreaIndex(AreaIndex<SplitArea> areaIndex) {
lms.setAreaIndex(areaIndex);
return this;
} | 3.68 |
hbase_ModifyRegionUtils_getRegionOpenAndInitThreadPool | /*
* used by createRegions() to get the thread pool executor based on the
* "hbase.hregion.open.and.init.threads.max" property.
*/
static ThreadPoolExecutor getRegionOpenAndInitThreadPool(final Configuration conf,
final String threadNamePrefix, int regionNumber) {
int maxThreads =
Math.min(regionNumber, conf... | 3.68 |
hbase_MergeTableRegionsProcedure_postCompletedMergeRegions | /**
* Post merge region action
* @param env MasterProcedureEnv
**/
private void postCompletedMergeRegions(final MasterProcedureEnv env) throws IOException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.postCompletedMergeRegionsAction(regionsToMerge, merged... | 3.68 |
hbase_CleanerChore_isEmptyDirDeletable | /**
* Check if a empty directory with no subdirs or subfiles can be deleted
* @param dir Path of the directory
* @return True if the directory can be deleted, otherwise false
*/
private boolean isEmptyDirDeletable(Path dir) {
for (T cleaner : cleanersChain) {
if (cleaner.isStopped() || this.getStopper().isSto... | 3.68 |
graphhopper_ReferentialIntegrityError_compareTo | /** must be comparable to put into mapdb */
@Override
public int compareTo (GTFSError o) {
int compare = super.compareTo(o);
if (compare != 0) return compare;
return this.badReference.compareTo((((ReferentialIntegrityError) o).badReference));
} | 3.68 |
framework_SQLContainer_indexInModifiedCache | /**
* Returns the index of the item with the given itemId for the modified
* cache.
*
* @param itemId
* @return the index of the item with the itemId in the modified cache. Or
* -1 if not found.
*/
private int indexInModifiedCache(Object itemId) {
for (int ix = 0; ix < modifiedItems.size(); ix++) {
... | 3.68 |
hadoop_PathCapabilitiesSupport_validatePathCapabilityArgs | /**
* Validate the arguments to
* {@link PathCapabilities#hasPathCapability(Path, String)}.
* @param path path to query the capability of.
* @param capability non-null, non-empty string to query the path for support.
* @return the string to use in a switch statement.
* @throws IllegalArgumentException if a an arg... | 3.68 |
hadoop_OBSFileSystem_rename | /**
* Rename Path src to Path dst.
*
* @param src path to be renamed
* @param dst new path after rename
* @return true if rename is successful
* @throws IOException on IO failure
*/
@Override
public boolean rename(final Path src, final Path dst) throws IOException {
long startTime = System.currentTimeMillis();... | 3.68 |
flink_MultipleParameterTool_getFlatMapOfData | /**
* Get the flat map of the multiple map data. If the key have multiple values, only the last one
* will be used. This is also the current behavior when multiple parameters is specified for
* {@link ParameterTool}.
*
* @param data multiple map of data.
* @return flat map of data.
*/
private static Map<String, ... | 3.68 |
hudi_RequestHandler_shouldThrowExceptionIfLocalViewBehind | /**
* Determine whether to throw an exception when local view of table's timeline is behind that of client's view.
*/
private boolean shouldThrowExceptionIfLocalViewBehind(HoodieTimeline localTimeline, String timelineHashFromClient) {
Option<HoodieInstant> lastInstant = localTimeline.lastInstant();
// When perfor... | 3.68 |
hbase_KeyValue_getTimestampOffset | /** Return the timestamp offset */
private int getTimestampOffset(final int keylength) {
return getKeyOffset() + keylength - TIMESTAMP_TYPE_SIZE;
} | 3.68 |
framework_VComboBox_highlightSelectedItem | /**
* Highlight (select) an item matching the current text box content
* without triggering its action.
*/
public void highlightSelectedItem() {
int p = getItems().size();
// first check if there is a key match to handle items with
// identical captions
String currentKey = currentSuggestion != null
... | 3.68 |
framework_Color_getHSV | /**
* Returns converted HSV components of the color.
*
*/
public float[] getHSV() {
float[] hsv = new float[3];
int maxColor = (red > green) ? red : green;
if (blue > maxColor) {
maxColor = blue;
}
int minColor = (red < green) ? red : green;
if (blue < minColor) {
minColor = ... | 3.68 |
flink_PushCalcPastChangelogNormalizeRule_pushCalcThroughChangelogNormalize | /**
* Pushes {@param primaryKeyPredicates} and used fields project into the {@link
* StreamPhysicalChangelogNormalize}.
*/
private StreamPhysicalChangelogNormalize pushCalcThroughChangelogNormalize(
RelOptRuleCall call, List<RexNode> primaryKeyPredicates, int[] usedInputFields) {
final StreamPhysicalChan... | 3.68 |
hbase_StoreFileWriter_appendMetadata | /**
* Writes meta data. Call before {@link #close()} since its written as meta data to this file.
* @param maxSequenceId Maximum sequence id.
* @param majorCompaction True if this file is product of a major compaction
* @param mobCellsCount The number of mob cells.
* @throws IOException problem writing to FS
... | 3.68 |
hadoop_DecayRpcSchedulerDetailedMetrics_addProcessingTime | /**
* Instrument a Call processing time based on its priority.
*
* @param priority of the RPC call
* @param processingTime of the RPC call in the queue of the priority
*/
public void addProcessingTime(int priority, long processingTime) {
rpcProcessingRates.add(processingNamesForLevels[priority], processingTime);... | 3.68 |
hbase_TimeoutExceptionInjector_trigger | /**
* Trigger the timer immediately.
* <p>
* Exposed for testing.
*/
public void trigger() {
synchronized (timerTask) {
if (this.complete) {
LOG.warn("Timer already completed, not triggering.");
return;
}
LOG.debug("Triggering timer immediately!");
this.timer.cancel();
this.timerTa... | 3.68 |
hadoop_StartupProgressServlet_writeStringFieldIfNotNull | /**
* Writes a JSON string field only if the value is non-null.
*
* @param json JsonGenerator to receive output
* @param key String key to put
* @param value String value to put
* @throws IOException if there is an I/O error
*/
private static void writeStringFieldIfNotNull(JsonGenerator json, String key,
St... | 3.68 |
framework_Table_getPropertyValue | /**
* Gets the value of property.
*
* By default if the table is editable the fieldFactory is used to create
* editors for table cells. Otherwise formatPropertyValue is used to format
* the value representation.
*
* @param rowId
* the Id of the row (same as item Id).
* @param colId
* the... | 3.68 |
hudi_Pipelines_bootstrap | /**
* Constructs bootstrap pipeline.
* The bootstrap operator loads the existing data index (primary key to file id mapping),
* then send the indexing data set to subsequent operator(usually the bucket assign operator).
*
* @param conf The configuration
* @param rowType The row type
* @param dataStream ... | 3.68 |
pulsar_KeyValueSchemaImpl_of | /**
* Key Value Schema using passed in schema type, support JSON and AVRO currently.
*/
public static <K, V> Schema<KeyValue<K, V>> of(Class<K> key, Class<V> value, SchemaType type) {
checkArgument(SchemaType.JSON == type || SchemaType.AVRO == type);
if (SchemaType.JSON == type) {
return new KeyValueS... | 3.68 |
dubbo_GlobalResourcesRepository_registerDisposable | /**
* Register a one-off disposable, the disposable is removed automatically on first shutdown.
*
* @param disposable
*/
public void registerDisposable(Disposable disposable) {
if (!oneoffDisposables.contains(disposable)) {
synchronized (this) {
if (!oneoffDisposables.contains(disposable)) {... | 3.68 |
morf_SqlQueryDataSetProducer_getSchema | /**
* Returns a {@link Schema} containing information about the {@link Table}
* associated with this {@link ResultSet}.
*/
@Override
public Schema getSchema() {
return schema;
} | 3.68 |
flink_StringUtils_readNullableString | /**
* Reads a String from the given input. The string may be null and must have been written with
* {@link #writeNullableString(String, DataOutputView)}.
*
* @param in The input to read from.
* @return The deserialized string, or null.
* @throws IOException Thrown, if the reading or the deserialization fails.
*/... | 3.68 |
dubbo_IOUtils_read | /**
* read string.
*
* @param reader Reader instance.
* @return String.
* @throws IOException If an I/O error occurs
*/
public static String read(Reader reader) throws IOException {
try (StringWriter writer = new StringWriter()) {
write(reader, writer);
return writer.getBuffer().toString();
... | 3.68 |
AreaShop_Utils_combinedMessage | /**
* Create a message with a list of parts.
* @param replacements The parts to use
* @param messagePart The message to use for the parts
* @param combiner The string to use as combiner
* @return A Message object containing the parts combined into one message
*/
public static Message combinedMessage(Collecti... | 3.68 |
flink_FlinkRelMetadataQuery_getColumnNullCount | /**
* Returns the null count of the given column.
*
* @param rel the relational expression
* @param index the index of the given column
* @return the null count of the given column if can be estimated, else return null.
*/
public Double getColumnNullCount(RelNode rel, int index) {
for (; ; ) {
try {
... | 3.68 |
hudi_HoodieTableConfig_getRecordKeyFieldProp | /**
* @returns the record key field prop.
*/
public String getRecordKeyFieldProp() {
return getStringOrDefault(RECORDKEY_FIELDS, HoodieRecord.RECORD_KEY_METADATA_FIELD);
} | 3.68 |
hadoop_ResourceEstimatorServer_startResourceEstimatorServer | /**
* Start embedded Hadoop HTTP server.
*
* @return an instance of the started HTTP server.
* @throws IOException in case there is an error while starting server.
*/
static ResourceEstimatorServer startResourceEstimatorServer()
throws IOException, InterruptedException {
Configuration config = new YarnConfig... | 3.68 |
hudi_BaseHoodieWriteClient_preWrite | /**
* Common method containing steps to be performed before write (upsert/insert/...
* @param instantTime
* @param writeOperationType
* @param metaClient
*/
public void preWrite(String instantTime, WriteOperationType writeOperationType,
HoodieTableMetaClient metaClient) {
setOperationType(wr... | 3.68 |
hbase_AsyncScanSingleRegionRpcRetryingCaller_destroy | // return the current state, and set the state to DESTROYED.
ScanControllerState destroy() {
ScanControllerState state = this.state;
this.state = ScanControllerState.DESTROYED;
return state;
} | 3.68 |
graphhopper_CarAverageSpeedParser_applyMaxSpeed | /**
* @param way needed to retrieve tags
* @param speed speed guessed e.g. from the road type or other tags
* @return The assumed speed.
*/
protected double applyMaxSpeed(ReaderWay way, double speed, boolean bwd) {
double maxSpeed = getMaxSpeed(way, bwd);
return Math.min(140, isValidSpeed(maxSpeed) ? Math... | 3.68 |
hbase_MetaTableAccessor_getRegionLocation | /**
* Returns the HRegionLocation from meta for the given region
* @param connection connection we're using
* @param regionInfo region information
* @return HRegionLocation for the given region
*/
public static HRegionLocation getRegionLocation(Connection connection, RegionInfo regionInfo)
throws IOException {
... | 3.68 |
querydsl_MetaDataExporter_setNameSuffix | /**
* Override the name suffix for the classes (default: "")
*
* @param nameSuffix name suffix for querydsl-types (default: "")
*/
public void setNameSuffix(String nameSuffix) {
module.bind(CodegenModule.SUFFIX, nameSuffix);
} | 3.68 |
framework_Slider_getOrientation | /**
* Gets the current orientation of the slider (horizontal or vertical).
*
* @return {@link SliderOrientation#HORIZONTAL} or
* {@link SliderOrientation#VERTICAL}
*/
public SliderOrientation getOrientation() {
return getState(false).orientation;
} | 3.68 |
hadoop_FedAppReportFetcher_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 appId id of the application to get.
* @return the ApplicationReport for the appId.
* @throws YarnException on any error.
* @throws IOException connection e... | 3.68 |
dubbo_ReferenceConfig_createAsyncMethodInfo | /**
* convert and aggregate async method info
*
* @return Map<String, AsyncMethodInfo>
*/
private Map<String, AsyncMethodInfo> createAsyncMethodInfo() {
Map<String, AsyncMethodInfo> attributes = null;
if (CollectionUtils.isNotEmpty(getMethods())) {
attributes = new HashMap<>(16);
for (Method... | 3.68 |
hadoop_JournalNodeRpcServer_getRpcServer | /** Allow access to the RPC server for testing. */
@VisibleForTesting
Server getRpcServer() {
return server;
} | 3.68 |
framework_BrowserInfo_isBrowserVersionNewerOrEqual | /**
* Checks if the browser version is newer or equal to the given major+minor
* version.
*
* @param majorVersion
* The major version to check for
* @param minorVersion
* The minor version to check for
* @return true if the browser version is newer or equal to the given
* version
... | 3.68 |
framework_ContainerEventProvider_getDescriptionProperty | /**
* Get the property which provides the description of the event.
*/
public Object getDescriptionProperty() {
return descriptionProperty;
} | 3.68 |
hudi_CollectionUtils_diffSet | /**
* Returns difference b/w {@code one} {@link Collection} of elements and {@code another}
* The elements in collection {@code one} are also duplicated and returned as a {@link Set}.
*/
public static <E> Set<E> diffSet(Collection<E> one, Set<E> another) {
Set<E> diff = new HashSet<>(one);
diff.removeAll(another... | 3.68 |
framework_Payload_getPayloadString | /**
* Returns the string representation of this payload. It is used as the data
* type in the {@code DataTransfer} object.
*
* @return the string representation of this payload
*/
public String getPayloadString() {
return ITEM_PREFIX + ":" + valueType.name().toLowerCase(Locale.ROOT)
+ ":" + key + "... | 3.68 |
framework_WebBrowser_getBrowserApplication | /**
* Get the browser user-agent string.
*
* @return The raw browser userAgent string
*/
public String getBrowserApplication() {
return browserApplication;
} | 3.68 |
hbase_FavoredNodesPlan_getAssignmentMap | /**
* Return the mapping between each region to its favored region server list.
*/
public Map<String, List<ServerName>> getAssignmentMap() {
// Make a deep copy so changes don't harm our copy of favoredNodesMap.
return this.favoredNodesMap.entrySet().stream()
.collect(Collectors.toMap(k -> k.getKey(), v -> ne... | 3.68 |
flink_WindowedStream_maxBy | /**
* Applies an aggregation that gives the maximum element of the pojo data stream by the given
* field expression for every window. A field expression is either the name of a public field or
* a getter method with parentheses of the {@link DataStream}S underlying type. A dot can be
* used to drill down into objec... | 3.68 |
flink_CheckpointStatsHistory_replacePendingCheckpointById | /**
* Searches for the in progress checkpoint with the given ID and replaces it with the given
* completed or failed checkpoint.
*
* <p>This is bounded by the maximum number of concurrent in progress checkpointsArray, which
* means that the runtime of this is constant.
*
* @param completedOrFailed The completed ... | 3.68 |
hbase_ServerManager_removeServerFromDrainList | /*
* Remove the server from the drain list.
*/
public synchronized boolean removeServerFromDrainList(final ServerName sn) {
// Warn if the server (sn) is not online. ServerName is of the form:
// <hostname> , <port> , <startcode>
if (!this.isServerOnline(sn)) {
LOG.warn("Server " + sn + " is not currently ... | 3.68 |
morf_Function_length | /**
* Helper method to create an instance of the "length" SQL function.
*
* @param fieldToEvaluate the field to evaluate in the length function. This can be any expression resulting in a single column of data.
* @return an instance of the length function.
*/
public static Function length(AliasedField fieldToEvalua... | 3.68 |
flink_IOManager_close | /** Removes all temporary files. */
@Override
public void close() throws Exception {
fileChannelManager.close();
} | 3.68 |
hibernate-validator_Contracts_assertNotNull | /**
* Asserts that the given object is not {@code null}.
*
* @param o The object to check.
* @param message A message text which will be used as message of the resulting
* exception if the given object is {@code null}.
*
* @throws IllegalArgumentException In case the given object is {@code null}.
*/
public stat... | 3.68 |
dubbo_DubboHealthIndicator_resolveStatusCheckerNamesMap | /**
* Resolves the map of {@link StatusChecker}'s name and its' source.
*
* @return non-null {@link Map}
*/
protected Map<String, String> resolveStatusCheckerNamesMap() {
Map<String, String> statusCheckerNamesMap = new LinkedHashMap<>();
statusCheckerNamesMap.putAll(resolveStatusCheckerNamesMapFromDubboHe... | 3.68 |
mutate-test-kata_Employee_setName | /**
* Set the employee name after removing leading and trailing spaces, which could be left by upstream system
* @param newName the new name for the employee, possibly with leading and trailing white space to be removed
*/
public void setName(String newName)
{
this.name = newName.replaceAll(" ", "");
} | 3.68 |
hudi_Option_or | /**
* Returns this {@link Option} if not empty, otherwise evaluates provided supplier
* and returns its result
*/
public Option<T> or(Supplier<? extends Option<T>> other) {
return val != null ? this : other.get();
} | 3.68 |
flink_FailureHandlingResult_restartable | /**
* Creates a result of a set of tasks to restart to recover from the failure.
*
* <p>The result can be flagged to be from a global failure triggered by the scheduler, rather
* than from the failure of an individual task.
*
* @param failedExecution the {@link Execution} that the failure is originating from. Pas... | 3.68 |
framework_Link_setTargetName | /**
* Sets the target window name.
*
* @param targetName
* the targetName to set.
*/
public void setTargetName(String targetName) {
getState().target = targetName;
} | 3.68 |
flink_ClusterClientFactory_getApplicationTargetName | /**
* Returns the option to be used when trying to execute an application in Application Mode using
* this cluster client factory, or an {@link Optional#empty()} if the environment of this
* cluster client factory does not support Application Mode.
*/
default Optional<String> getApplicationTargetName() {
return... | 3.68 |
graphhopper_WaySegmentParser_readOSM | /**
* @param osmFile the OSM file to parse, supported formats include .osm.xml, .osm.gz and .xml.pbf
*/
public void readOSM(File osmFile) {
if (nodeData.getNodeCount() > 0)
throw new IllegalStateException("You can only run way segment parser once");
LOGGER.info("Start reading OSM file: '" + osmFile +... | 3.68 |
framework_VScrollTable_setContainerHeight | /**
* Fix container blocks height according to totalRows to avoid
* "bouncing" when scrolling
*/
private void setContainerHeight() {
fixSpacers();
container.getStyle().setHeight(measureRowHeightOffset(totalRows),
Unit.PX);
} | 3.68 |
hbase_AsyncBufferedMutatorImpl_internalFlush | // will be overridden in test
protected void internalFlush() {
if (periodicFlushTask != null) {
periodicFlushTask.cancel();
periodicFlushTask = null;
}
List<Mutation> toSend = this.mutations;
if (toSend.isEmpty()) {
return;
}
List<CompletableFuture<Void>> toComplete = this.futures;
assert toSe... | 3.68 |
rocketmq-connect_AbstractConnectController_resumeConnector | /**
* Resume the connector. This call will asynchronously start the connector and its tasks (if
* not started already).
*
* @param connector name of the connector
*/
public void resumeConnector(String connector) {
configManagementService.resumeConnector(connector);
} | 3.68 |
AreaShop_GeneralRegion_setSchematicProfile | /**
* Change the restore profile.
* @param profile default or the name of the profile as set in the config
*/
public void setSchematicProfile(String profile) {
setSetting("general.schematicProfile", profile);
} | 3.68 |
druid_MySqlStatementParser_parseIf | /**
* parse if statement
*
* @return MySqlIfStatement
*/
public SQLIfStatement parseIf() {
accept(Token.IF);
SQLIfStatement stmt = new SQLIfStatement();
stmt.setCondition(this.exprParser.expr());
accept(Token.THEN);
this.parseStatementList(stmt.getStatements(), -1, stmt);
while (lexer.t... | 3.68 |
framework_VScrollTable_setHorizontalScrollPosition | /**
* Set the horizontal position in the cell in the footer. This is done
* when a horizontal scrollbar is present.
*
* @param scrollLeft
* The value of the leftScroll
*/
public void setHorizontalScrollPosition(int scrollLeft) {
hTableWrapper.setScrollLeft(scrollLeft);
} | 3.68 |
framework_CellReference_getElement | /**
* Get the element of the cell.
*
* @return the element of the cell
*/
public TableCellElement getElement() {
return rowReference.getElement().getCells().getItem(columnIndexDOM);
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.