name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_DefaultOBSClientFactory_createHuaweiObsClient | /**
* Creates an {@link ObsClient} from the established configuration.
*
* @param conf Hadoop configuration
* @param obsConf ObsConfiguration
* @param name URL
* @return ObsClient client
* @throws IOException on any failure to create Huawei OBS client
*/
private static ObsClient createHuaweiObsClient(fina... | 3.68 |
morf_OracleDialect_renameTableStatements | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#renameTableStatements(org.alfasoftware.morf.metadata.Table, org.alfasoftware.morf.metadata.Table)
*/
@Override
public Collection<String> renameTableStatements(Table fromTable, Table toTable) {
String from = truncatedTableName(fromTable.getName());
String fromConstr... | 3.68 |
hudi_SqlQueryBuilder_where | /**
* Appends a WHERE clause to a query.
*
* @param predicate The predicate for WHERE clause.
* @return The {@link SqlQueryBuilder} instance.
*/
public SqlQueryBuilder where(String predicate) {
if (StringUtils.isNullOrEmpty(predicate)) {
throw new IllegalArgumentException("No predicate provided with WHERE cl... | 3.68 |
framework_VAbstractPopupCalendar_setFocusedDate | /**
* Sets the content of a special field for assistive devices, so that they
* can recognize the change and inform the user (reading out in case of
* screen reader).
*
* @param selectedDate
* Date that is currently selected
*/
public void setFocusedDate(Date selectedDate) {
this.selectedDate.setT... | 3.68 |
hadoop_HamletImpl_subView | /**
* Sub-classes should override this to do something interesting.
* @param cls the sub-view class
*/
protected void subView(Class<? extends SubView> cls) {
indent(of(ENDTAG)); // not an inline view
sb.setLength(0);
out.print(sb.append('[').append(cls.getName()).append(']').toString());
out.println();
} | 3.68 |
hbase_MemStoreFlusher_getMemStoreHeapSize | /** Returns Return memstore heap size or null if <code>r</code> is null */
private static long getMemStoreHeapSize(HRegion r) {
return r == null ? 0 : r.getMemStoreHeapSize();
} | 3.68 |
framework_VaadinSession_setConverterFactory | /**
* Sets the {@code ConverterFactory} used to locate a suitable
* {@code Converter} for fields in the session.
* <p>
* The {@code ConverterFactory} is used to find a suitable converter when
* binding data to a UI component and the data type does not match the UI
* component type, e.g. binding a Double to a Text... | 3.68 |
hadoop_AzureNativeFileSystemStore_isAuthenticatedAccess | /**
* Private method to check for authenticated access.
*
* @ returns boolean -- true if access is credentialed and authenticated and
* false otherwise.
*/
private boolean isAuthenticatedAccess() throws AzureException {
if (isAnonymousCredentials) {
// Access to this storage account is unauthenticated.
... | 3.68 |
flink_BoundedBlockingSubpartition_isFinished | /**
* Checks if writing is finished. Readers cannot be created until writing is finished, and no
* further writes can happen after that.
*/
public boolean isFinished() {
return isFinished;
} | 3.68 |
flink_KvStateLocation_registerKvState | /**
* Registers a KvState instance for the given key group index.
*
* @param keyGroupRange Key group range to register
* @param kvStateId ID of the KvState instance at the key group index.
* @param kvStateAddress Server address of the KvState instance at the key group index.
* @throws IndexOutOfBoundsException If... | 3.68 |
hadoop_FlowRunColumn_getColumnQualifier | /**
* @return the column name value
*/
private String getColumnQualifier() {
return columnQualifier;
} | 3.68 |
flink_ScalarFunction_getParameterTypes | /**
* Returns {@link TypeInformation} about the operands of the evaluation method with a given
* signature.
*
* @deprecated This method uses the old type system and is based on the old reflective
* extraction logic. The method will be removed in future versions and is only called when
* using the deprecat... | 3.68 |
hadoop_CallableSupplier_get | /**
* Active any span and then call the supplied callable.
* @return the result.
*/
@Override
public T get() {
try {
if (auditSpan != null) {
auditSpan.activate();
}
return call.call();
} catch (RuntimeException e) {
throw e;
} catch (IOException e) {
throw new UncheckedIOException(e)... | 3.68 |
hudi_HDFSParquetImporterUtils_parseSchema | /**
* Parse Schema from file.
*
* @param fs File System
* @param schemaFile Schema File
*/
public static String parseSchema(FileSystem fs, String schemaFile) throws Exception {
// Read schema file.
Path p = new Path(schemaFile);
if (!fs.exists(p)) {
throw new Exception(String.format("Could not fi... | 3.68 |
open-banking-gateway_HbciRestorePreValidationContext_lastRedirectionTarget | // FIXME SerializerUtil does not support nestedness
private LastRedirectionTarget lastRedirectionTarget(BaseContext current) {
if (null == current.getLastRedirection()) {
return null;
}
LastRedirectionTarget target = current.getLastRedirection();
target.setRequestScoped(current.getRequestScoped... | 3.68 |
hadoop_ManifestCommitter_exitStage | /**
* Remove stage from common audit context.
* @param stage stage exited.
*/
@Override
public void exitStage(String stage) {
AuditingIntegration.exitStage();
} | 3.68 |
hadoop_NMContainerStatus_getExecutionType | /**
* Get the <code>ExecutionType</code> of the container.
* @return <code>ExecutionType</code> of the container
*/
public ExecutionType getExecutionType() {
return ExecutionType.GUARANTEED;
} | 3.68 |
hudi_FlinkCreateHandle_deleteInvalidDataFile | /**
* The flink checkpoints start in sequence and asynchronously, when one write task finish the checkpoint(A)
* (thus the fs view got the written data files some of which may be invalid),
* it goes on with the next round checkpoint(B) write immediately,
* if it tries to reuse the last small data bucket(small file)... | 3.68 |
framework_AbstractSingleSelect_setValue | /**
* Sets the value of this object which is an item to select. If the new
* value is not equal to {@code getValue()}, fires a value change event. If
* value is {@code null} then it deselects currently selected item.
* <p>
* The call is delegated to {@link #setSelectedItem(Object)}.
*
* @see #setSelectedItem(Obj... | 3.68 |
hudi_HoodieTimelineArchiver_archiveIfRequired | /**
* Check if commits need to be archived. If yes, archive commits.
*/
public int archiveIfRequired(HoodieEngineContext context, boolean acquireLock) throws IOException {
try {
if (acquireLock) {
// there is no owner or instant time per se for archival.
txnManager.beginTransaction(Option.empty(), O... | 3.68 |
hbase_LogLevel_connect | /**
* Connect to the URL. Supports HTTP and supports SPNEGO authentication. It falls back to simple
* authentication if it fails to initiate SPNEGO.
* @param url the URL address of the daemon servlet
* @return a connected connection
* @throws Exception if it can not establish a connection.
*/
private HttpURLConne... | 3.68 |
framework_CalendarWeekDropHandler_isLocationValid | /**
* Checks if the location is a valid drop location
*
* @param elementOver
* The element to check
* @return
*/
private boolean isLocationValid(Element elementOver) {
Element weekGridElement = calendarConnector.getWidget().getWeekGrid()
.getElement();
Element timeBarElement = calen... | 3.68 |
pulsar_NamespaceName_getTopicName | /**
* Compose the topic name from namespace + topic.
*
* @param domain
* @param topic
* @return
*/
String getTopicName(TopicDomain domain, String topic) {
if (domain == null) {
throw new IllegalArgumentException("invalid null domain");
}
NamedEntity.checkName(topic);
return String.format("... | 3.68 |
framework_AccordionConnector_onConnectorHierarchyChange | /*
* (non-Javadoc)
*
* @see com.vaadin.client.ConnectorHierarchyChangeEvent.
* ConnectorHierarchyChangeHandler
* #onConnectorHierarchyChange(com.vaadin.client
* .ConnectorHierarchyChangeEvent)
*/
@Override
public void onConnectorHierarchyChange(
ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent... | 3.68 |
hbase_MasterObserver_preCreateTable | /**
* Called before a new table is created by {@link org.apache.hadoop.hbase.master.HMaster}. Called
* as part of create table RPC call.
* @param ctx the environment to interact with the framework and master
* @param desc the TableDescriptor for the table
* @param regions the initial regions created for the... | 3.68 |
pulsar_ConsumerBase_trackUnAckedMsgIfNoListener | // if listener is not null, we will track unAcked msg in callMessageListener
protected void trackUnAckedMsgIfNoListener(MessageId messageId, int redeliveryCount) {
if (listener == null) {
unAckedMessageTracker.add(messageId, redeliveryCount);
}
} | 3.68 |
hudi_BaseHoodieWriteClient_scheduleClustering | /**
* Schedules a new clustering instant.
* @param extraMetadata Extra Metadata to be stored
*/
public Option<String> scheduleClustering(Option<Map<String, String>> extraMetadata) throws HoodieIOException {
String instantTime = createNewInstantTime();
return scheduleClusteringAtInstant(instantTime, extraMetadata... | 3.68 |
framework_Label_setPropertyDataSource | /**
* Sets the property as data-source for viewing. Since Vaadin 7.2 a
* ValueChangeEvent is fired if the new value is different from previous.
*
* @param newDataSource
* the new data source Property
* @see Property.Viewer#setPropertyDataSource(Property)
*/
@Override
public void setPropertyDataSource(... | 3.68 |
hadoop_LightWeightLinkedSet_clear | /**
* Clear the set. Resize it to the original capacity.
*/
@Override
public void clear() {
super.clear();
this.head = null;
this.tail = null;
this.resetBookmark();
} | 3.68 |
framework_AbstractContainer_removeListener | /**
* @deprecated As of 7.0, replaced by
* {@link #addItemSetChangeListener(Container.ItemSetChangeListener)}
*/
@Deprecated
protected void removeListener(Container.ItemSetChangeListener listener) {
removeItemSetChangeListener(listener);
} | 3.68 |
pulsar_ManagedLedgerConfig_setEnsembleSize | /**
* @param ensembleSize
* the ensembleSize to set
*/
public ManagedLedgerConfig setEnsembleSize(int ensembleSize) {
this.ensembleSize = ensembleSize;
return this;
} | 3.68 |
flink_StreamExecutionEnvironment_getParallelism | /**
* Gets the parallelism with which operation are executed by default. Operations can
* individually override this value to use a specific parallelism.
*
* @return The parallelism used by operations, unless they override that value.
*/
public int getParallelism() {
return config.getParallelism();
} | 3.68 |
open-banking-gateway_FintechConsentAccessImpl_getAvailableConsentsForCurrentPsu | /**
* Returns available consents to the PSU (not FinTech).
*/
@Override
public Collection<ProtocolFacingConsent> getAvailableConsentsForCurrentPsu() {
return Collections.emptyList();
} | 3.68 |
flink_KvStateInfo_getStateValueSerializer | /** @return The serializer for the values kept in the state. */
public TypeSerializer<V> getStateValueSerializer() {
return stateValueSerializer;
} | 3.68 |
AreaShop_GeneralRegion_getName | /**
* Get the name of the region.
* @return The region name
*/
@Override
public String getName() {
return config.getString("general.name");
} | 3.68 |
flink_SavepointReader_readKeyedState | /**
* Read keyed state from an operator in a {@code Savepoint}.
*
* @param identifier The identifier of the operator.
* @param function The {@link KeyedStateReaderFunction} that is called for each key in state.
* @param keyTypeInfo The type information of the key in state.
* @param outTypeInfo The type informatio... | 3.68 |
hbase_RegistryEndpointsRefresher_create | /**
* Create a {@link RegistryEndpointsRefresher}. If the interval secs configured via
* {@code intervalSecsConfigName} is less than zero, will return null here, which means disable
* refreshing of endpoints.
*/
static RegistryEndpointsRefresher create(Configuration conf, String initialDelaySecsConfigName,
String... | 3.68 |
hadoop_ProtocolProxy_isMethodSupported | /**
* Check if a method is supported by the server or not.
*
* @param methodName a method's name in String format
* @param parameterTypes a method's parameter types
* @return true if the method is supported by the server
* @throws IOException raised on errors performing I/O.
*/
public synchronized boolean isMet... | 3.68 |
streampipes_SpOpcUaClient_createListSubscription | /***
* Register subscriptions for given OPC UA nodes
* @param nodes List of {@link org.eclipse.milo.opcua.stack.core.types.builtin.NodeId}
* @param opcUaAdapter current instance of {@link OpcUaAdapter}
* @throws Exception
*/
public void createListSubscription(List<NodeId> nodes,
... | 3.68 |
hbase_QualifierFilter_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 QualifierFilter)) {
return false;
}
return ... | 3.68 |
morf_AbstractSqlDialectTest_testDropViewStatements | /**
* Tests SQL for dropping a view.
*/
@SuppressWarnings("unchecked")
@Test
public void testDropViewStatements() {
compareStatements(
expectedDropViewStatements(),
testDialect.dropStatements(testView));
} | 3.68 |
hadoop_SinglePendingCommit_getTaskId | /** @return Task ID, if known. */
public String getTaskId() {
return taskId;
} | 3.68 |
hadoop_HAState_getLastHATransitionTime | /**
* Gets the most recent HA transition time in milliseconds from the epoch.
*
* @return the most recent HA transition time in milliseconds from the epoch.
*/
public long getLastHATransitionTime() {
return lastHATransitionTime;
} | 3.68 |
flink_StreamProjection_projectTuple12 | /**
* Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
*
* @return The projected DataStream.
* @see Tuple
* @see DataStream
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
SingleOutputStreamOperator<Tuple12<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>>
... | 3.68 |
framework_AbstractProperty_isReadOnly | /**
* {@inheritDoc}
*
* Override for additional restrictions on what is considered a read-only
* property.
*/
@Override
public boolean isReadOnly() {
return readOnly;
} | 3.68 |
flink_TaskManagerLocation_getHostName | /**
* Returns the textual representation of the TaskManager's IP address as host name.
*
* @return The textual representation of the TaskManager's IP address.
*/
@Override
public String getHostName() {
return inetAddress.getHostAddress();
} | 3.68 |
flink_AbstractOrcColumnVector_createFlinkVectorFromConstant | /** Create flink vector by hive vector from constant. */
public static org.apache.flink.table.data.columnar.vector.ColumnVector
createFlinkVectorFromConstant(LogicalType type, Object value, int batchSize) {
return createFlinkVector(createHiveVectorFromConstant(type, value, batchSize), type);
} | 3.68 |
hbase_Append_isReturnResults | /** Returns current setting for returnResults */
// This method makes public the superclasses's protected method.
@Override
public boolean isReturnResults() {
return super.isReturnResults();
} | 3.68 |
hbase_WALEdit_isReplicationMarkerEdit | /**
* Checks whether this edit is a replication marker edit.
* @param edit edit
* @return true if the cell within an edit has column = METAFAMILY and qualifier =
* REPLICATION_MARKER, false otherwise
*/
public static boolean isReplicationMarkerEdit(WALEdit edit) {
// Check just the first cell from the ed... | 3.68 |
hadoop_TrashProcedure_moveToTrash | /**
* Delete source path to trash.
*/
void moveToTrash() throws IOException {
Path src = context.getSrc();
if (srcFs.exists(src)) {
TrashOption trashOption = context.getTrashOpt();
switch (trashOption) {
case TRASH:
conf.setFloat(FS_TRASH_INTERVAL_KEY, 60);
if (!Trash.moveToAppropriateTras... | 3.68 |
morf_JdbcUrlElements_withHost | /**
* Sets the host. Defaults to null (no host specified).
*
* @param host The host name.
* @return this
*/
public Builder withHost(String host) {
this.host = host;
return this;
} | 3.68 |
framework_LoginForm_setLoginButtonCaption | /**
* Sets the caption of the login button. Note that the caption can only be
* set with this method before the login form has been initialized
* (attached).
* <p>
* As an alternative to calling this method, the method
* {@link #createLoginButton()} can be overridden.
*
* @param loginButtonCaption
* ... | 3.68 |
framework_PropertysetItem_addItemProperty | /**
* Tries to add a new Property into the Item.
*
* @param id
* the ID of the new Property.
* @param property
* the Property to be added and associated with the id.
* @return <code>true</code> if the operation succeeded, <code>false</code>
* if not
*/
@Override
public boolean add... | 3.68 |
flink_HadoopInputFormatCommonBase_getCredentialsFromUGI | /**
* @param ugi The user information
* @return new credentials object from the user information.
*/
public static Credentials getCredentialsFromUGI(UserGroupInformation ugi) {
return ugi.getCredentials();
} | 3.68 |
flink_ConnectedStreams_getType2 | /**
* Gets the type of the second input.
*
* @return The type of the second input
*/
public TypeInformation<IN2> getType2() {
return inputStream2.getType();
} | 3.68 |
hudi_CloudObjectsSelector_createAmazonSqsClient | /**
* Amazon SQS Client Builder.
*/
public SqsClient createAmazonSqsClient() {
return SqsClient.builder().region(Region.of(regionName)).build();
} | 3.68 |
hadoop_ImageVisitor_visit | // Convenience methods to automatically convert numeric value types to strings
void visit(ImageElement element, int value) throws IOException {
visit(element, Integer.toString(value));
} | 3.68 |
flink_FactoryUtil_getFormatPrefix | /** Returns the required option prefix for options of the given format. */
public static String getFormatPrefix(
ConfigOption<String> formatOption, String formatIdentifier) {
final String formatOptionKey = formatOption.key();
if (formatOptionKey.equals(FORMAT.key())) {
return formatIdentifier + ... | 3.68 |
querydsl_SQLExpressions_groupConcat | /**
* Get a group_concat(expr, separator) expression
*
* @param expr expression to be aggregated
* @param separator separator string
* @return group_concat(expr, separator)
*/
public static StringExpression groupConcat(Expression<String> expr, String separator) {
return Expressions.stringOperation(SQLOps.GROU... | 3.68 |
flink_MemorySegment_copyToUnsafe | /**
* Bulk copy method. Copies {@code numBytes} bytes to target unsafe object and pointer. NOTE:
* This is an unsafe method, no check here, please be careful.
*
* @param offset The position where the bytes are started to be read from in this memory
* segment.
* @param target The unsafe memory to copy the byte... | 3.68 |
hbase_RSGroupInfoManagerImpl_getOnlineServers | /** Returns Set of online Servers named for their hostname and port (not ServerName). */
private Set<Address> getOnlineServers() {
return masterServices.getServerManager().getOnlineServers().keySet().stream()
.map(ServerName::getAddress).collect(Collectors.toSet());
} | 3.68 |
framework_WeekGrid_getDateCellWidths | /**
* @return an int-array containing the widths of the cells (days)
*/
public int[] getDateCellWidths() {
return cellWidths;
} | 3.68 |
hudi_CloudObjectsSelector_createListPartitions | /**
* Create partitions of list using specific batch size. we can't use third party API for this
* functionality, due to https://github.com/apache/hudi/blob/master/style/checkstyle.xml#L270
*/
protected List<List<Message>> createListPartitions(List<Message> singleList, int eachBatchSize) {
List<List<Message>> list... | 3.68 |
hadoop_AbfsConfiguration_get | /**
* Returns the account-specific value if it exists, then looks for an
* account-agnostic value.
* @param key Account-agnostic configuration key
* @return value if one exists, else null
*/
public String get(String key) {
return rawConfig.get(accountConf(key), rawConfig.get(key));
} | 3.68 |
flink_TaskEventDispatcher_publish | /**
* Publishes the event to the registered {@link EventListener} instances.
*
* <p>This method is either called directly from a {@link LocalInputChannel} or the network I/O
* thread on behalf of a {@link RemoteInputChannel}.
*
* @return whether the event was published to a registered event handler (initiated via... | 3.68 |
flink_JobEdge_setDownstreamSubtaskStateMapper | /**
* Sets the channel state rescaler used for rescaling persisted data on downstream side of this
* JobEdge.
*
* @param downstreamSubtaskStateMapper The channel state rescaler selector to use.
*/
public void setDownstreamSubtaskStateMapper(SubtaskStateMapper downstreamSubtaskStateMapper) {
this.downstreamSubt... | 3.68 |
querydsl_ComparableExpression_loeAll | /**
* Create a {@code this <= all right} expression
*
* @param right rhs of the comparison
* @return this <= all right
*/
public BooleanExpression loeAll(SubQueryExpression<? extends T> right) {
return loe(ExpressionUtils.all(right));
} | 3.68 |
AreaShop_AreaShop_getBukkitHandler | /**
* Get the BukkitHandler, for sign interactions.
* @return BukkitHandler
*/
public BukkitInterface getBukkitHandler() {
return this.bukkitInterface;
} | 3.68 |
hudi_HoodieBaseFile_getFileIdAndCommitTimeFromFileName | /**
* Parses the file ID and commit time from the fileName.
* @param fileName Name of the file
* @return String array of size 2 with fileId as the first and commitTime as the second element.
*/
private static String[] getFileIdAndCommitTimeFromFileName(String fileName) {
return ExternalFilePathUtil.isExternallyCr... | 3.68 |
hbase_Call_setResponse | /**
* Set the return value when there is no error. Notify the caller the call is done.
* @param response return value of the call.
* @param cells Can be null
*/
public void setResponse(Message response, final CellScanner cells) {
synchronized (this) {
if (done) {
return;
}
this.done = true;
... | 3.68 |
flink_CanalJsonFormatFactory_validateEncodingFormatOptions | /** Validator for canal encoding format. */
private static void validateEncodingFormatOptions(ReadableConfig tableOptions) {
JsonFormatOptionsUtil.validateEncodingFormatOptions(tableOptions);
} | 3.68 |
morf_XmlDataSetProducer_getSchema | /**
* @see org.alfasoftware.morf.dataset.DataSetProducer#getSchema()
*/
@Override
public Schema getSchema() {
return new PullProcessorMetaDataProvider(xmlStreamProvider);
} | 3.68 |
querydsl_AbstractMySQLQuery_ignoreIndex | /**
* The alternative syntax IGNORE INDEX (index_list) can be used to tell MySQL to not use some
* particular index or indexes.
*
* @param indexes index names
* @return the current object
*/
public C ignoreIndex(String... indexes) {
return addJoinFlag(" ignore index (" + String.join(", ", indexes) + ")", Join... | 3.68 |
hbase_BloomFilterUtil_computeMaxKeys | /**
* The maximum number of keys we can put into a Bloom filter of a certain size to get the given
* error rate, with the given number of hash functions.
* @return the maximum number of keys that can be inserted in a Bloom filter to maintain the
* target error rate, if the number of hash functions is provid... | 3.68 |
querydsl_GenericExporter_export | /**
* Export the given classes
*
* @param classes classes to be scanned
*/
public void export(Class<?>...classes) {
for (Class<?> cl : classes) {
handleClass(cl);
}
innerExport();
} | 3.68 |
hbase_RegionState_isReadyToOffline | /**
* Check if a region state can transition to offline
*/
public boolean isReadyToOffline() {
return isMerged() || isSplit() || isOffline() || isSplittingNew() || isMergingNew();
} | 3.68 |
framework_ServerRpcHandler_handleRpc | /**
* Reads JSON containing zero or more serialized RPC calls (including legacy
* variable changes) and executes the calls.
*
* @param ui
* The {@link UI} receiving the calls. Cannot be null.
* @param reader
* The {@link Reader} used to read the JSON.
* @param request
* The {@l... | 3.68 |
framework_LayoutManager_getPaddingTop | /**
* Gets the top padding of the given element, provided that it has been
* measured. These elements are guaranteed to be measured:
* <ul>
* <li>ManagedLayouts and their child Connectors
* <li>Elements for which there is at least one ElementResizeListener
* <li>Elements for which at least one ManagedLayout has r... | 3.68 |
flink_CastRuleProvider_resolve | /**
* Resolve a {@link CastRule} for the provided input type and target type. Returns {@code null}
* if no rule can be resolved.
*/
public static @Nullable CastRule<?, ?> resolve(LogicalType inputType, LogicalType targetType) {
return INSTANCE.internalResolve(inputType, targetType);
} | 3.68 |
flink_CopyOnWriteSkipListStateMap_getNode | /**
* Find the node containing the given key.
*
* @param keySegment memory segment storing the key.
* @param keyOffset offset of the key.
* @param keyLen length of the key.
* @return the state. Null will be returned if key does not exist.
*/
@VisibleForTesting
@Nullable
S getNode(MemorySegment keySegment, int ke... | 3.68 |
flink_DataSetUtils_zipWithUniqueId | /**
* Method that assigns a unique {@link Long} value to all elements in the input data set as
* described below.
*
* <ul>
* <li>a map function is applied to the input data set
* <li>each map task holds a counter c which is increased for each record
* <li>c is shifted by n bits where n = log2(number of par... | 3.68 |
framework_VCalendarPanel_isAcceptedByRangeEnd | /**
* Accepts dates earlier than or equal to rangeStart, depending on the
* resolution. If the resolution is set to DAY, the range will compare on a
* day-basis. If the resolution is set to YEAR, only years are compared. So
* even if the range is set to one millisecond in next year, also next year
* will be includ... | 3.68 |
hudi_HoodieConsistentBucketLayout_layoutPartitionerClass | /**
* Consistent hashing will tag all incoming records, so we could go ahead reusing an existing Partitioner
*/
@Override
public Option<String> layoutPartitionerClass() {
return Option.empty();
} | 3.68 |
hadoop_ColumnHeader_getSelector | /**
* Get the selector field for the TH.
* @return Selector.
*/
public String getSelector() {
return this.selector;
} | 3.68 |
zxing_EdifactEncoder_handleEOD | /**
* Handle "end of data" situations
*
* @param context the encoder context
* @param buffer the buffer with the remaining encoded characters
*/
private static void handleEOD(EncoderContext context, CharSequence buffer) {
try {
int count = buffer.length();
if (count == 0) {
return; //Already finis... | 3.68 |
flink_AbstractAggregatingMetricsHandler_getAggregatedMetricValues | /**
* Extracts and aggregates all requested metrics from the given metric stores, and maps the
* result to a JSON string.
*
* @param stores available metrics
* @param requestedMetrics ids of requested metrics
* @param requestedAggregationsFactories requested aggregations
* @return JSON string containing the requ... | 3.68 |
hbase_MasterObserver_preIsRpcThrottleEnabled | /**
* Called before getting if is rpc throttle enabled.
* @param ctx the coprocessor instance's environment
*/
default void preIsRpcThrottleEnabled(final ObserverContext<MasterCoprocessorEnvironment> ctx)
throws IOException {
} | 3.68 |
flink_BackgroundTask_runAfter | /**
* Runs the given task after this background task has completed (normally or exceptionally).
*
* @param task task to run after this background task has completed
* @param executor executor to run the task
* @param <V> type of the result
* @return new {@link BackgroundTask} representing the new task to execute
... | 3.68 |
querydsl_Expressions_path | /**
* Create a new Path expression
*
* @param type type of expression
* @param metadata path metadata
* @param <T> type of expression
* @return path expression
*/
public static <T> SimplePath<T> path(Class<? extends T> type, PathMetadata metadata) {
return simplePath(type, metadata);
} | 3.68 |
hbase_MasterObserver_preDeleteNamespace | /**
* Called before {@link org.apache.hadoop.hbase.master.HMaster} deletes a namespace
* @param ctx the environment to interact with the framework and master
* @param namespace the name of the namespace
*/
default void preDeleteNamespace(final ObserverContext<MasterCoprocessorEnvironment> ctx,
String namesp... | 3.68 |
hbase_RawFloat_decodeFloat | /**
* Read a {@code float} value from the buffer {@code buff}.
*/
public float decodeFloat(byte[] buff, int offset) {
return Bytes.toFloat(buff, offset);
} | 3.68 |
hadoop_ServiceLauncher_launchServiceAndExit | /**
* Launch the service and exit.
*
* <ol>
* <li>Parse the command line.</li>
* <li>Build the service configuration from it.</li>
* <li>Start the service.</li>
* <li>If it is a {@link LaunchableService}: execute it</li>
* <li>Otherwise: wait for it to finish.</li>
* <li>Exit passing the status code to the {@... | 3.68 |
framework_AbstractOrderedLayout_setMargin | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.Layout.MarginHandler#setMargin(MarginInfo)
*/
@Override
public void setMargin(MarginInfo marginInfo) {
getState().marginsBitmask = marginInfo.getBitMask();
} | 3.68 |
hudi_AvroSchemaCompatibility_getCompatibility | /**
* Returns the SchemaCompatibilityType, always non-null.
*
* @return a SchemaCompatibilityType instance, always non-null
*/
public SchemaCompatibilityType getCompatibility() {
return mCompatibilityType;
} | 3.68 |
flink_CheckpointConfig_setForceUnalignedCheckpoints | /**
* Checks whether unaligned checkpoints are forced, despite currently non-checkpointable
* iteration feedback or custom partitioners.
*
* @param forceUnalignedCheckpoints The flag to force unaligned checkpoints.
*/
@PublicEvolving
public void setForceUnalignedCheckpoints(boolean forceUnalignedCheckpoints) {
... | 3.68 |
hudi_KafkaOffsetGen_isValidTimestampCheckpointType | /**
* Check if the checkpoint is a timestamp.
* @param lastCheckpointStr
* @return
*/
private Boolean isValidTimestampCheckpointType(Option<String> lastCheckpointStr) {
if (!lastCheckpointStr.isPresent()) {
return false;
}
Pattern pattern = Pattern.compile("[-+]?[0-9]+(\\.[0-9]+)?");
Matcher isNum = pat... | 3.68 |
hmily_HmilyRepositoryFacade_createHmilyParticipant | /**
* Create hmily participant.
*
* @param hmilyParticipant the hmily participant
*/
public void createHmilyParticipant(final HmilyParticipant hmilyParticipant) {
checkRows(hmilyRepository.createHmilyParticipant(hmilyParticipant));
} | 3.68 |
flink_FactoryUtil_checkFormatIdentifierMatchesWithEnrichingOptions | /**
* This function assumes that the format config is used only and only if the original
* configuration contains the format config option. It will fail if there is a mismatch of
* the identifier between the format in the plan table map and the one in enriching table
* map.
*/
private void checkFormatIdentifierMat... | 3.68 |
rocketmq-connect_FilterTransform_start | /**
* Start the component
*
* @param config component context
*/
@Override
public void start(KeyValue config) {
this.keyValue = config;
log.info("transform config {}", this.keyValue);
} | 3.68 |
hbase_HRegionServer_getCopyOfOnlineRegionsSortedByOnHeapSize | /**
* @return A new Map of online regions sorted by region heap size with the first entry being the
* biggest.
*/
SortedMap<Long, Collection<HRegion>> getCopyOfOnlineRegionsSortedByOnHeapSize() {
// we'll sort the regions in reverse
SortedMap<Long, Collection<HRegion>> sortedRegions = new TreeMap<>(Compa... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.