name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_ApplicationACLsManager_checkAccess | /**
* If authorization is enabled, checks whether the user (in the callerUGI) is
* authorized to perform the access specified by 'applicationAccessType' on
* the application by checking if the user is applicationOwner or part of
* application ACL for the specific access-type.
* <ul>
* <li>The owner of the applica... | 3.68 |
zxing_C40Encoder_handleEOD | /**
* Handle "end of data" situations
*
* @param context the encoder context
* @param buffer the buffer with the remaining encoded characters
*/
void handleEOD(EncoderContext context, StringBuilder buffer) {
int unwritten = (buffer.length() / 3) * 2;
int rest = buffer.length() % 3;
int curCodewordCount = c... | 3.68 |
zxing_EmailAddressParsedResult_getEmailAddress | /**
* @return first elements of {@link #getTos()} or {@code null} if none
* @deprecated use {@link #getTos()}
*/
@Deprecated
public String getEmailAddress() {
return tos == null || tos.length == 0 ? null : tos[0];
} | 3.68 |
open-banking-gateway_ValidatedExecution_execute | /**
* Entrypoint for Flowable BPMN to call the service.
*/
@Override
@Transactional(noRollbackFor = BpmnError.class)
public void execute(DelegateExecution execution) {
@SuppressWarnings("unchecked")
T context = (T) ContextUtil.getContext(execution, BaseContext.class);
logResolver.log("execute: execution ... | 3.68 |
Activiti_ProcessEngines_retry | /**
* retries to initialize a process engine that previously failed.
*/
public static ProcessEngineInfo retry(String resourceUrl) {
log.debug("retying initializing of resource {}", resourceUrl);
try {
return initProcessEngineFromResource(new URL(resourceUrl));
} catch (MalformedURLException e) {
throw n... | 3.68 |
cron-utils_SingleCron_equivalent | /**
* Provides means to compare if two cron expressions are equivalent.
* Assumes same cron definition.
*
* @param cron - any cron instance, never null
* @return boolean - true if equivalent; false otherwise.
*/
public boolean equivalent(final Cron cron) {
return asString().equals(cron.asString());
} | 3.68 |
hadoop_StringValueMax_reset | /**
* reset the aggregator
*/
public void reset() {
maxVal = null;
} | 3.68 |
flink_SharedBufferAccessor_advanceTime | /**
* Notifies shared buffer that there will be no events with timestamp <&eq; the given value.
* It allows to clear internal counters for number of events seen so far per timestamp.
*
* @param timestamp watermark, no earlier events will arrive
* @throws Exception Thrown if the system cannot access the state.
... | 3.68 |
graphhopper_Instruction_setUseRawName | /**
* This method does not perform translation or combination with the sign - it just uses the
* provided name as instruction.
*/
public void setUseRawName() {
rawName = true;
} | 3.68 |
hadoop_AbstractTask_write | /**
* Write Task.
* @param out : dataoutout object.
* @throws IOException : Throws IO exception if any error occurs.
*/
@Override
public final void write(final DataOutput out) throws IOException {
taskID.write(out);
int environmentSize = 0;
if (environment == null) {
environmentSize = 0;
} else {
en... | 3.68 |
hadoop_TaskManifest_addFileToCommit | /**
* Add a file to the list of files to commit.
* @param entry entry to add
*/
public void addFileToCommit(FileEntry entry) {
filesToCommit.add(entry);
} | 3.68 |
framework_PropertyFilterDefinition_getMaxNestingDepth | /**
* Returns the maximum amount of nesting levels for sub-properties.
*
* @return maximum nesting depth
*/
public int getMaxNestingDepth() {
return maxNestingDepth;
} | 3.68 |
framework_VLoadingIndicator_ensureTriggered | /**
* Triggers displaying of this loading indicator unless it's already visible
* or scheduled to be shown after a delay.
*
* @since 7.4
*/
public void ensureTriggered() {
if (!isVisible() && !firstTimer.isRunning()) {
trigger();
}
} | 3.68 |
flink_OptimizerNode_readStubAnnotations | /**
* Reads all stub annotations, i.e. which fields remain constant, what cardinality bounds the
* functions have, which fields remain unique.
*/
protected void readStubAnnotations() {
readUniqueFieldsAnnotation();
} | 3.68 |
hbase_TableSchemaModel_getColumnFamily | /**
* Retrieve the column family at the given index from the table descriptor
* @param index the index
* @return the column family model
*/
public ColumnSchemaModel getColumnFamily(int index) {
return columns.get(index);
} | 3.68 |
hbase_HRegion_getWALRegionDir | /**
* @return the Region directory under WALRootDirectory
* @throws IOException if there is an error getting WALRootDir
*/
public Path getWALRegionDir() throws IOException {
if (regionWalDir == null) {
regionWalDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
getRegionInfo().getEncod... | 3.68 |
hbase_ParseFilter_isQuoteUnescaped | /**
* Returns a boolean indicating whether the quote was escaped or not
* <p>
* @param array byte array in which the quote was found
* @param quoteIndex index of the single quote
* @return returns true if the quote was unescaped
*/
public static boolean isQuoteUnescaped(byte[] array, int quoteIndex) {
if (... | 3.68 |
hudi_JavaExecutionStrategy_getPartitioner | /**
* Create {@link BulkInsertPartitioner} based on strategy params.
*
* @param strategyParams Strategy parameters containing columns to sort the data by when clustering.
* @param schema Schema of the data including metadata fields.
* @return partitioner for the java engine
*/
protected BulkInsertPartitio... | 3.68 |
flink_ConnectedStreams_map | /**
* Applies a CoMap transformation on a {@link ConnectedStreams} and maps the output to a common
* type. The transformation calls a {@link CoMapFunction#map1} for each element of the first
* input and {@link CoMapFunction#map2} for each element of the second input. Each CoMapFunction
* call returns exactly one el... | 3.68 |
hadoop_OBSDataBlocks_validateWriteArgs | /**
* Validate args to a write command. These are the same validation checks
* expected for any implementation of {@code OutputStream.write()}.
*
* @param b byte array containing data
* @param off offset in array where to start
* @param len number of bytes to be written
* @throws NullPointerException for ... | 3.68 |
framework_AbstractSelect_size | /**
* Gets the number of items in the container.
*
* @return the Number of items in the container.
*
* @see Container#size()
*/
@Override
public int size() {
int size = items.size();
assert size >= 0;
return size;
} | 3.68 |
hbase_IncrementingEnvironmentEdge_incrementTime | /**
* Increment the time by the given amount
*/
public synchronized long incrementTime(long amount) {
timeIncrement += amount;
return timeIncrement;
} | 3.68 |
druid_ListDG_BFS | /*
* 广度优先搜索(类似于树的层次遍历)
*/
public void BFS() {
int head = 0;
int rear = 0;
int[] queue = new int[mVexs.size()]; // 辅组队列
boolean[] visited = new boolean[mVexs.size()]; // 顶点访问标记
for (int i = 0; i < mVexs.size(); i++) {
visited[i] = false;
}
for (int i = 0; i < mVexs.siz... | 3.68 |
hadoop_GetGroupsBase_getUgmProtocol | /**
* Get a client of the {@link GetUserMappingsProtocol}.
* @return A {@link GetUserMappingsProtocol} client proxy.
* @throws IOException raised on errors performing I/O.
*/
protected GetUserMappingsProtocol getUgmProtocol() throws IOException {
GetUserMappingsProtocol userGroupMappingProtocol =
RPC.getProxy... | 3.68 |
hbase_StoreFileInfo_isMobFile | /**
* Checks if the file is a MOB file
* @param path path to a file
* @return true, if - yes, false otherwise
*/
public static boolean isMobFile(final Path path) {
String fileName = path.getName();
String[] parts = fileName.split(MobUtils.SEP);
if (parts.length != 2) {
return false;
}
Matcher m = HFIL... | 3.68 |
framework_VTwinColSelect_getOptionsCaption | /**
* Gets the options caption HTML Widget.
*
* @return the options caption widget
*/
protected HTML getOptionsCaption() {
if (optionsCaption == null) {
optionsCaption = new HTML();
optionsCaption.setStyleName(CLASSNAME + "-caption-left");
optionsCaption.getElement().getStyle()
... | 3.68 |
flink_NormalizedKeySorter_write | /**
* Writes a given record to this sort buffer. The written record will be appended and take the
* last logical position.
*
* @param record The record to be written.
* @return True, if the record was successfully written, false, if the sort buffer was full.
* @throws IOException Thrown, if an error occurred whil... | 3.68 |
hadoop_OBSPosixBucketUtils_fsRenameToNewFolder | /**
* Used to rename a source folder to a destination folder that is not existed
* before rename.
*
* @param owner OBS File System instance
* @param src source folder key
* @param dst destination folder key that not existed before rename
* @throws IOException any io exception
* @throws ObsException any obs... | 3.68 |
hbase_AsyncTableRegionLocator_getRegionLocation | /**
* Finds the region with the given <code>replicaId</code> on which the given row is being served.
* <p/>
* Returns the location of the region with the given <code>replicaId</code> to which the row
* belongs.
* @param row Row to find.
* @param replicaId the replica id of the region
*/
default Completable... | 3.68 |
flink_HiveParserDDLSemanticAnalyzer_getPartitionSpec | // get partition metadata
public static Map<String, String> getPartitionSpec(HiveParserASTNode ast) {
HiveParserASTNode partNode = null;
// if this ast has only one child, then no partition spec specified.
if (ast.getChildCount() == 1) {
return null;
}
// if ast has two children
// the ... | 3.68 |
morf_DataValueLookupMetadata_equals | /**
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
return this == obj; // Fully interned
} | 3.68 |
flink_Tuple5_copy | /**
* Shallow tuple copy.
*
* @return A new Tuple with the same fields as this.
*/
@Override
@SuppressWarnings("unchecked")
public Tuple5<T0, T1, T2, T3, T4> copy() {
return new Tuple5<>(this.f0, this.f1, this.f2, this.f3, this.f4);
} | 3.68 |
hadoop_AzureFileSystemInstrumentation_webResponse | /**
* Indicate that we just got a web response from Azure Storage. This should
* be called for every web request/response we do (to get accurate metrics
* of how we're hitting the storage service).
*/
public void webResponse() {
numberOfWebResponses.incr();
inMemoryNumberOfWebResponses.incrementAndGet();
} | 3.68 |
hudi_HoodieTableMetaClient_scanFiles | /**
* Helper method to scan all hoodie-instant metafiles.
*
* @param fs The file system implementation for this table
* @param metaPath The meta path where meta files are stored
* @param nameFilter The name filter to filter meta files
* @return An array of meta FileStatus
* @throws IOException In case ... | 3.68 |
hbase_BlockCache_getBlock | /**
* Fetch block from cache.
* @param cacheKey Block to fetch.
* @param caching Whether this request has caching enabled (used for stats)
* @param repeat Whether this is a repeat lookup for the same block (used to avoid
* double counting cache misses when... | 3.68 |
pulsar_ContextImpl_tryGetConsumer | // returns null if consumer not found
private Consumer<?> tryGetConsumer(String topic, int partition) {
if (partition == 0) {
// maybe a non-partitioned topic
Consumer<?> consumer = topicConsumers.get(TopicName.get(topic));
if (consumer != null) {
return consumer;
}
... | 3.68 |
pulsar_PulsarJsonRowDecoder_decodeRow | /**
* decode ByteBuf by {@link org.apache.pulsar.client.api.schema.GenericSchema}.
* @param byteBuf
* @return
*/
@Override
public Optional<Map<DecoderColumnHandle, FieldValueProvider>> decodeRow(ByteBuf byteBuf) {
GenericJsonRecord record = (GenericJsonRecord) genericJsonSchema.decode(byteBuf);
JsonNode tre... | 3.68 |
framework_DateCell_shouldDisplay | /**
*
* @param event
* @return
*
* This method is not necessary in the long run.. Or here can be
* various types of implementations..
*/
// Date methods not deprecated in GWT
@SuppressWarnings("deprecation")
private boolean shouldDisplay(CalendarEvent event) {
boolean display = true;
if (... | 3.68 |
framework_Escalator_setScrollTop | /**
* Sets the vertical scroll offset. Note that this will not necessarily
* become the same as the {@code scrollTop} attribute in the DOM.
*
* @param scrollTop
* the number of pixels to scroll vertically
*/
public void setScrollTop(final double scrollTop) {
verticalScrollbar.setScrollPos(scrollTop... | 3.68 |
dubbo_ProtobufTypeBuilder_generateListFieldName | /**
* get list property name from setting method.<br/>
* ex: getXXXList()<br/>
*
* @param methodName
* @return
*/
private String generateListFieldName(String methodName) {
return toCamelCase(methodName.substring(3, methodName.length() - 4));
} | 3.68 |
framework_DDEventHandleStrategy_handleMouseOut | /**
* Called to handle {@link Event#ONMOUSEOUT} event.
*
* @param target
* target element over which DnD event has happened
* @param event
* ONMOUSEOUT GWT event for active DnD operation
* @param mediator
* VDragAndDropManager data accessor
*/
protected void handleMouseOut(Elem... | 3.68 |
hibernate-validator_ReflectionHelper_getClassFromType | /**
* Converts the given {@code Type} to a {@code Class}.
*
* @param type the type to convert
* @return the class corresponding to the type
*/
public static Class<?> getClassFromType(Type type) {
if ( type instanceof Class ) {
return (Class<?>) type;
}
if ( type instanceof ParameterizedType ) {
return getCl... | 3.68 |
flink_FailureHandlingResult_getVerticesToRestart | /**
* Returns the tasks to restart.
*
* @return the tasks to restart
*/
public Set<ExecutionVertexID> getVerticesToRestart() {
if (canRestart()) {
return verticesToRestart;
} else {
throw new IllegalStateException(
"Cannot get vertices to restart when the restarting is suppre... | 3.68 |
graphhopper_LocationIndexTree_calculateRMin | /**
* Calculates the distance to the nearest tile border, where the tile border is the rectangular
* region with dimension 2*paddingTiles + 1 and where the center tile contains the given lat/lon
* coordinate
*/
final double calculateRMin(double lat, double lon, int paddingTiles) {
int x = indexStructureInfo.get... | 3.68 |
framework_FocusOnSelectedItem_setup | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@Override
protected void setup(VaadinRequest request) {
final Table table = new Table();
table.setSelectable(true);
table.setImmediate(true);
table.addContainerProperty("Property", ... | 3.68 |
hmily_RejectedPolicyTypeEnum_fromString | /**
* From string rejected policy type enum.
*
* @param value the value
* @return the rejected policy type enum
*/
public static RejectedPolicyTypeEnum fromString(final String value) {
Optional<RejectedPolicyTypeEnum> rejectedPolicyTypeEnum =
Arrays.stream(RejectedPolicyTypeEnum.values())
... | 3.68 |
hudi_CompactionUtils_getAllPendingCompactionOperationsInPendingCompactionPlans | /**
* Get all partition + file Ids with pending Log Compaction operations and their target log compaction instant time.
*/
public static Map<HoodieFileGroupId, Pair<String, HoodieCompactionOperation>> getAllPendingCompactionOperationsInPendingCompactionPlans(
List<Pair<HoodieInstant, HoodieCompactionPlan>> pendin... | 3.68 |
hadoop_FederationPolicyInitializationContext_setHomeSubcluster | /**
* Sets in the context the home sub-cluster. Useful for default policy
* behaviors.
*
* @param homeSubcluster value to set.
*/
public void setHomeSubcluster(SubClusterId homeSubcluster) {
this.homeSubcluster = homeSubcluster;
} | 3.68 |
flink_FutureCompletingBlockingQueue_wakeUpPuttingThread | /**
* Gracefully wakes up the thread with the given {@code threadIndex} if it is blocked in adding
* an element. to the queue. If the thread is blocked in {@link #put(int, Object)} it will
* immediately return from the method with a return value of false.
*
* <p>If this method is called, the next time the thread w... | 3.68 |
hbase_ByteBufferInputStream_skip | /**
* Skips <code>n</code> bytes of input from this input stream. Fewer bytes might be skipped if the
* end of the input stream is reached. The actual number <code>k</code> of bytes to be skipped is
* equal to the smaller of <code>n</code> and remaining bytes in the stream.
* @param n the number of bytes to be skip... | 3.68 |
dubbo_WrappedChannelHandler_getPreferredExecutorService | /**
* Currently, this method is mainly customized to facilitate the thread model on consumer side.
* 1. Use ThreadlessExecutor, aka., delegate callback directly to the thread initiating the call.
* 2. Use shared executor to execute the callback.
*
* @param msg
* @return
*/
public ExecutorService getPreferredExec... | 3.68 |
hbase_TableSplit_getEncodedRegionName | /**
* Returns the region's encoded name.
* @return The region's encoded name.
*/
public String getEncodedRegionName() {
return encodedRegionName;
} | 3.68 |
framework_AtmospherePushConnection_onConnect | /**
* Called whenever a server push connection is established (or
* re-established).
*
* @param response
*
* @since 7.2
*/
protected void onConnect(AtmosphereResponse response) {
transport = response.getTransport();
switch (state) {
case CONNECT_PENDING:
state = State.CONNECTED;
getCo... | 3.68 |
hudi_SparkHoodieHBaseIndex_close | /**
* Ensure that any resources used for indexing are released here.
*/
@Override
public void close() {
LOG.info("No resources to release from Hbase index");
} | 3.68 |
hudi_HoodieTableMetadataUtil_getRollbackedCommits | /**
* Returns a list of commits which were rolled back as part of a Rollback or Restore operation.
*
* @param instant The Rollback operation to read
* @param timeline instant of timeline from dataset.
*/
private static List<String> getRollbackedCommits(HoodieInstant instant, HoodieActiveTimeline timeline) {
try... | 3.68 |
framework_FieldGroup_getPropertyId | /**
* Returns the property id that is bound to the given field.
*
* @param field
* The field to use to lookup the property id
* @return The property id that is bound to the field or null if the field
* is not bound to any property id by this FieldBinder
*/
public Object getPropertyId(Field<?> ... | 3.68 |
pulsar_FunctionMetaDataManager_initialize | /**
* Initializes the FunctionMetaDataManager.
* We create a new reader
*/
public synchronized void initialize() {
try (Reader reader = FunctionMetaDataTopicTailer.createReader(
workerConfig, pulsarClient.newReader(), MessageId.earliest)) {
// read all existing messages
while (reader.... | 3.68 |
flink_HiveParserExpressionWalker_walk | /** walk the current operator and its descendants. */
protected void walk(Node nd) throws SemanticException {
// Push the node in the stack
opStack.push(nd);
// While there are still nodes to dispatch...
while (!opStack.empty()) {
Node node = opStack.peek();
if (node.getChildren() == n... | 3.68 |
hbase_KeyStoreFileType_fromFilename | /**
* Detects the type of KeyStore / TrustStore file from the file extension. If the file name ends
* with ".jks", returns <code>StoreFileType.JKS</code>. If the file name ends with ".pem", returns
* <code>StoreFileType.PEM</code>. If the file name ends with ".p12", returns
* <code>StoreFileType.PKCS12</code>. If t... | 3.68 |
framework_TouchScrollDelegate_getTimeStamp | /**
* Long calculation are not very efficient in GWT, so this helper method
* returns timestamp in double.
*
* @return
*/
public static double getTimeStamp() {
return Duration.currentTimeMillis();
} | 3.68 |
hbase_AggregateImplementation_getStd | /**
* Gives a Pair with first object a List containing Sum and sum of squares, and the second object
* as row count. It is computed for a given combination of column qualifier and column family in
* the given row range as defined in the Scan object. In its current implementation, it takes one
* column family and on... | 3.68 |
flink_CopyOnWriteSkipListStateMap_helpSetNodeStatus | /** Set node status to the given new status, and return old status. */
private NodeStatus helpSetNodeStatus(long node, NodeStatus newStatus) {
Node nodeStorage = getNodeSegmentAndOffset(node);
MemorySegment segment = nodeStorage.nodeSegment;
int offsetInSegment = nodeStorage.nodeOffset;
NodeStatus oldSt... | 3.68 |
querydsl_PropertyAccessInvocationHandler_intercept | //CHECKSTYLE:OFF
@Override
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
//CHECKSTYLE:ON
Object rv = null;
MethodType methodType = MethodType.get(method);
if (methodType == MethodType.GETTER) {
String ptyName = propertyNameForGetter... | 3.68 |
flink_ExecutionConfig_setClosureCleanerLevel | /**
* Configures the closure cleaner. Please see {@link ClosureCleanerLevel} for details on the
* different settings.
*/
public ExecutionConfig setClosureCleanerLevel(ClosureCleanerLevel level) {
configuration.set(PipelineOptions.CLOSURE_CLEANER_LEVEL, level);
return this;
} | 3.68 |
hbase_BalanceResponse_setMovesCalculated | /**
* Set how many moves were calculated by the balancer. This will be zero if the cluster is
* already balanced.
* @param movesCalculated moves calculated by the balance run
*/
public Builder setMovesCalculated(int movesCalculated) {
this.movesCalculated = movesCalculated;
return this;
} | 3.68 |
hbase_Log4jUtils_enableDebug | /**
* Switches the logger for the given class to DEBUG level.
* @param clazz The class for which to switch to debug logging.
*/
public static void enableDebug(Class<?> clazz) {
setLogLevel(clazz.getName(), "DEBUG");
} | 3.68 |
hadoop_ArrayFile_append | /**
* Append a value to the file.
* @param value value.
* @throws IOException raised on errors performing I/O.
*/
public synchronized void append(Writable value) throws IOException {
super.append(count, value); // add to map
count.set(count.get()+1); // increment count
} | 3.68 |
hudi_HiveSyncTool_syncPartitions | /**
* Syncs added, updated, and dropped partitions to the metastore.
*
* @param tableName The table name in the metastore.
* @param partitionEventList The partition change event list.
* @return {@code true} if one or more partition(s) are changed in the metastore;
* {@code false} otherwise.
*/
private b... | 3.68 |
streampipes_TextDocument_setTitle | /**
* Updates the "main" title for this document.
*
* @param title
*/
public void setTitle(final String title) {
this.title = title;
} | 3.68 |
hbase_ServerRegionReplicaUtil_getStoreFileInfo | /**
* Returns a StoreFileInfo from the given FileStatus. Secondary replicas refer to the files of the
* primary region, so an HFileLink is used to construct the StoreFileInfo. This way ensures that
* the secondary will be able to continue reading the store files even if they are moved to
* archive after compaction
... | 3.68 |
flink_OptimizedPlan_getJobName | /**
* Returns the name of the program.
*
* @return The name of the program.
*/
public String getJobName() {
return this.jobName;
} | 3.68 |
hadoop_SystemErasureCodingPolicies_getPolicies | /**
* Get system defined policies.
* @return system policies
*/
public static List<ErasureCodingPolicy> getPolicies() {
return SYS_POLICIES;
} | 3.68 |
graphhopper_Path_calcNodes | /**
* @return the uncached node indices of the tower nodes in this path.
*/
public IntIndexedContainer calcNodes() {
final IntArrayList nodes = new IntArrayList(edgeIds.size() + 1);
if (edgeIds.isEmpty()) {
if (isFound()) {
nodes.add(endNode);
}
return nodes;
}
int... | 3.68 |
framework_VaadinPortletRequest_getPortletRequest | /**
* Gets the original, unwrapped portlet request.
*
* @return the unwrapped portlet request
*/
public PortletRequest getPortletRequest() {
return getRequest();
} | 3.68 |
hbase_HBaseRpcController_hasRegionInfo | /** Returns True if this Controller is carrying the RPC target Region's RegionInfo. */
default boolean hasRegionInfo() {
return false;
} | 3.68 |
hmily_XaResourcePool_removeAll | /**
* Remove all.
*
* @param globalId the global id
*/
public void removeAll(final String globalId) {
Set<Xid> xids = this.xids.get(globalId);
if (xids != null) {
for (final Xid xid : xids) {
removeResource(xid);
}
this.xids.remove(globalId);
}
} | 3.68 |
framework_EventCellReference_set | /**
* Configures this CellReference and its internal RowReference to point to
* the given Cell.
*
* @param targetCell
* the cell to point to
* @param section
* the section the cell belongs to
*/
public void set(Cell targetCell, Section section) {
Grid<T> grid = getGrid();
int colu... | 3.68 |
flink_CsvReader_lineDelimiter | /**
* Configures the delimiter that separates the lines/rows. The linebreak character ({@code
* '\n'}) is used by default.
*
* @param delimiter The delimiter that separates the rows.
* @return The CSV reader instance itself, to allow for fluent function chaining.
*/
public CsvReader lineDelimiter(String delimiter... | 3.68 |
hmily_HmilyTacParticipantCoordinator_rollbackParticipant | /**
* Rollback participant.
*
* @param hmilyParticipantList the hmily participant list
* @param selfParticipantId the self participant id
*/
public void rollbackParticipant(final List<HmilyParticipant> hmilyParticipantList, final Long selfParticipantId) {
if (CollectionUtils.isEmpty(hmilyParticipantList)) {... | 3.68 |
framework_Navigator_setErrorProvider | /**
* Registers a view provider that is queried for a view when no other view
* matches the navigation state. An error view provider should match any
* navigation state, but could return different views for different states.
* Its <code>getViewName(String navigationState)</code> should return
* <code>navigationSta... | 3.68 |
hadoop_S3ClientFactory_withHeader | /**
* Add a custom header.
* @param header header name
* @param value new value
* @return the builder
*/
public S3ClientCreationParameters withHeader(
String header, String value) {
headers.put(header, value);
return this;
} | 3.68 |
framework_DateField_getType | /*
* Gets the edited property's type. Don't add a JavaDoc comment here, we use
* the default documentation from implemented interface.
*/
@Override
public Class<Date> getType() {
return Date.class;
} | 3.68 |
hmily_HmilyXaRecoveryImpl_convert | /**
* Convert hmily xa recovery.
*
* @param <T> the type parameter
* @param t the t
* @return the hmily xa recovery
*/
public static <T extends HmilyXaRecovery> HmilyXaRecovery convert(final T t) {
HmilyXaRecoveryImpl impl = new HmilyXaRecoveryImpl();
impl.setCreateTime(t.getCreateTime());
impl.setU... | 3.68 |
zxing_ModulusPoly_getCoefficient | /**
* @return coefficient of x^degree term in this polynomial
*/
int getCoefficient(int degree) {
return coefficients[coefficients.length - 1 - degree];
} | 3.68 |
framework_VCssLayout_addOrMove | /**
* For internal use only. May be removed or replaced in the future.
*/
public void addOrMove(Widget child, int index) {
Profiler.enter("VCssLayout.addOrMove");
if (child.getParent() == this) {
Profiler.enter("VCssLayout.addOrMove getWidgetIndex");
int currentIndex = getWidgetIndex(child);
... | 3.68 |
dubbo_HashedWheelTimer_start | /**
* Starts the background thread explicitly. The background thread will
* start automatically on demand even if you did not call this method.
*
* @throws IllegalStateException if this timer has been
* {@linkplain #stop() stopped} already
*/
public void start() {
switch (WORKER... | 3.68 |
AreaShop_FileManager_getRegions | /**
* Get all regions.
* @return List of all regions (it is safe to modify the list)
*/
public List<GeneralRegion> getRegions() {
return new ArrayList<>(regions.values());
} | 3.68 |
flink_StreamNonDeterministicUpdatePlanVisitor_extractSourceMapping | /** Extracts the out from source field index mapping of the given projects. */
private Map<Integer, List<Integer>> extractSourceMapping(final List<RexNode> projects) {
Map<Integer, List<Integer>> mapOutFromInPos = new HashMap<>();
for (int index = 0; index < projects.size(); index++) {
RexNode expr = p... | 3.68 |
hadoop_WriteOperationHelper_abortMultipartCommit | /**
* Abort a multipart commit operation.
* @param destKey destination key of ongoing operation
* @param uploadId multipart operation Id
* @throws IOException on problems.
* @throws FileNotFoundException if the abort ID is unknown
*/
@Override
@Retries.RetryTranslated
public void abortMultipartCommit(String destK... | 3.68 |
flink_HiveParserExpressionWalker_shouldByPass | /**
* We should bypass subquery since we have already processed and created logical plan (in
* genLogicalPlan) for subquery at this point. SubQueryExprProcessor will use generated plan and
* creates appropriate ExprNodeSubQueryDesc.
*/
private boolean shouldByPass(Node childNode, Node parentNode) {
if (parentNo... | 3.68 |
pulsar_TxnBatchedPositionImpl_compareTo | /**
* It's exactly the same as {@link PositionImpl},to make sure that when compare to the "markDeletePosition", it
* looks like {@link PositionImpl}. {@link #batchSize} and {@link #batchIndex} should not be involved in calculate,
* just like {@link PositionImpl#ackSet} is not involved in calculate.
* Note: In {@lin... | 3.68 |
hadoop_PlacementConstraintManagerService_getValidSourceTag | /**
* This method will return a single allocation tag. It should be called after
* validating the tags by calling {@link #validateSourceTags}.
*
* @param sourceTags the source allocation tags
* @return the single source tag
*/
protected String getValidSourceTag(Set<String> sourceTags) {
return sourceTags.iterat... | 3.68 |
framework_Upload_removeStartedListener | /**
* Removes the upload started event listener.
*
* @param listener
* the Listener to be removed.
*/
@Deprecated
public void removeStartedListener(StartedListener listener) {
removeListener(StartedEvent.class, listener, UPLOAD_STARTED_METHOD);
} | 3.68 |
zxing_BitMatrix_get | /**
* <p>Gets the requested bit, where true means black.</p>
*
* @param x The horizontal component (i.e. which column)
* @param y The vertical component (i.e. which row)
* @return value of given bit in matrix
*/
public boolean get(int x, int y) {
int offset = y * rowSize + (x / 32);
return ((bits[offset] >>> ... | 3.68 |
flink_TableFunctionProvider_of | /** Helper method for creating a static provider. */
static <T> TableFunctionProvider<T> of(TableFunction<T> tableFunction) {
return () -> tableFunction;
} | 3.68 |
flink_FieldParser_getParserForType | /**
* Gets the parser for the type specified by the given class. Returns null, if no parser for
* that class is known.
*
* @param type The class of the type to get the parser for.
* @return The parser for the given type, or null, if no such parser exists.
*/
public static <T> Class<FieldParser<T>> getParserForTyp... | 3.68 |
flink_StateTable_size | /**
* Returns the total number of entries in this {@link StateTable}. This is the sum of both
* sub-tables.
*
* @return the number of entries in this {@link StateTable}.
*/
public int size() {
int count = 0;
for (StateMap<K, N, S> stateMap : keyGroupedStateMaps) {
count += stateMap.size();
}
... | 3.68 |
zxing_BitArray_reverse | /**
* Reverses all bits in the array.
*/
public void reverse() {
int[] newBits = new int[bits.length];
// reverse all int's first
int len = (size - 1) / 32;
int oldBitsLen = len + 1;
for (int i = 0; i < oldBitsLen; i++) {
newBits[len - i] = Integer.reverse(bits[i]);
}
// now correct the int's if the... | 3.68 |
hadoop_FederationStateStoreFacade_getReservationHomeSubCluster | /**
* Returns the home {@link SubClusterId} for the specified {@link ReservationId}.
*
* @param reservationId the identifier of the reservation
* @return the home subCluster identifier
* @throws YarnException if the call to the state store is unsuccessful
*/
public SubClusterId getReservationHomeSubCluster(Reserv... | 3.68 |
rocketmq-connect_IdentifierRules_leadingQuoteString | /**
* Get the string used as a leading quote.
*
* @return the leading quote string; never null
*/
public String leadingQuoteString() {
return leadingQuoteString;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.