name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_AllocateRequest_setSchedulingRequests
/** * Set the list of Scheduling requests to inform the * <code>ResourceManager</code> about the application's resource requirements * (potentially including allocation tags and placement constraints). * @param schedulingRequests list of {@link SchedulingRequest} to update * the <code>ResourceManager</cod...
3.68
hbase_WALUtil_writeRegionEventMarker
/** * Write a region open marker indicating that the region is opened. This write is for internal use * only. Not for external client consumption. */ public static WALKeyImpl writeRegionEventMarker(WAL wal, NavigableMap<byte[], Integer> replicationScope, RegionInfo hri, RegionEventDescriptor r, MultiVersionConcu...
3.68
framework_AbstractComponentContainer_fireComponentDetachEvent
/** * Fires the component detached event. This should be called by the * removeComponent methods after the component have been removed from this * container. * * @param component * the component that has been removed from this container. */ protected void fireComponentDetachEvent(Component component) ...
3.68
hudi_HoodieAvroUtils_sanitizeName
/** * Sanitizes Name according to Avro rule for names. * Removes characters other than the ones mentioned in https://avro.apache.org/docs/current/spec.html#names . * * @param name input name * @param invalidCharMask replacement for invalid characters. * @return sanitized name */ public static String s...
3.68
dubbo_AbstractConfigManager_getConfig
/** * Get config instance by id or by name * * @param cls Config type * @param idOrName the id or name of the config * @return */ public <T extends AbstractConfig> Optional<T> getConfig(Class<T> cls, String idOrName) { T config = getConfigById(getTagName(cls), idOrName); if (config == null) { ...
3.68
hudi_RocksDBDAO_putInBatch
/** * Helper to add put operation in batch. * * @param batch Batch Handle * @param columnFamilyName Column Family * @param key Key * @param value Payload * @param <T> Type of payload */ public <K extends Serializable, T extends Serializable> void putInBatch(WriteBatch batch, String columnFamilyName, K key, ...
3.68
flink_Executors_newDirectExecutorServiceWithNoOpShutdown
/** * Creates a new {@link ExecutorService} that runs the passed tasks in the calling thread but * doesn't implement proper shutdown behavior. Tasks can be still submitted even after {@link * ExecutorService#shutdown()} is called. * * @see #newDirectExecutorService() */ public static ExecutorService newDirectExec...
3.68
hbase_OrderedBytes_isFixedInt64
/** * Return true when the next encoded value in {@code src} uses fixed-width Int64 encoding, false * otherwise. */ public static boolean isFixedInt64(PositionedByteRange src) { return FIXED_INT64 == (-1 == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek()); }
3.68
hbase_HBaseMetrics2HadoopMetricsAdapter_snapshotAllMetrics
/** * Iterates over the MetricRegistry and adds them to the {@code builder}. * @param builder A record builder */ public void snapshotAllMetrics(MetricRegistry metricRegistry, MetricsRecordBuilder builder) { Map<String, Metric> metrics = metricRegistry.getMetrics(); for (Map.Entry<String, Metric> e : metrics.en...
3.68
framework_TableElementContextMenu_fillTable
// fill the table with some random data private void fillTable(Table table) { initProperties(table); for (int i = 0; i < ROWS; i++) { String[] line = new String[COLUMNS]; for (int j = 0; j < COLUMNS; j++) { line[j] = "col=" + j + " row=" + i; } table.addItem(line, nul...
3.68
flink_PartitionTempFileManager_createPartitionDir
/** Generate a new partition directory with partitions. */ public Path createPartitionDir(String... partitions) { Path parentPath = taskTmpDir; for (String dir : partitions) { parentPath = new Path(parentPath, dir); } return new Path(parentPath, newFileName()); }
3.68
MagicPlugin_SpellResult_isSuccess
/** * Determine if this result is a success or not, * possibly counting no_target as a success. * * @return True if this cast was a success. */ public boolean isSuccess(boolean castOnNoTarget) { if (this == SpellResult.NO_TARGET || this == SpellResult.NO_ACTION || this == SpellResult.STOP) { return cas...
3.68
hudi_BaseHoodieWriteClient_cluster
/** * Ensures clustering instant is in expected state and performs clustering for the plan stored in metadata. * @param clusteringInstant Clustering Instant Time * @return Collection of Write Status */ public HoodieWriteMetadata<O> cluster(String clusteringInstant, boolean shouldComplete) { HoodieTable table = cr...
3.68
hadoop_FilePosition_absolute
/** * Gets the current absolute position within this file. * * @return the current absolute position within this file. */ public long absolute() { throwIfInvalidBuffer(); return bufferStartOffset + relative(); }
3.68
framework_AbsoluteLayoutConnector_addDefaultPositionIfMissing
/** * Adds default value of 0.0px for the given property if it's missing from * the position string altogether. If the property value is already set no * changes are needed. * * @param position * original position styles * @param property * the property that needs to have a value * @retur...
3.68
flink_Optimizer_compile
/** * Translates the given program to an OptimizedPlan. The optimized plan describes for each * operator which strategy to use (such as hash join versus sort-merge join), what data exchange * method to use (local pipe forward, shuffle, broadcast), what exchange mode to use (pipelined, * batch), where to cache inter...
3.68
framework_Escalator_snapDeltas
/** * Snap deltas of x and y to the major four axes (up, down, left, right) * with a threshold of a number of degrees from those axes. * * @param deltaX * the delta in the x axis * @param deltaY * the delta in the y axis * @param thresholdRatio * the threshold in ratio (0..1) b...
3.68
hbase_RequestConverter_buildEnableCatalogJanitorRequest
/** * Creates a request for enabling/disabling the catalog janitor * @return A {@link EnableCatalogJanitorRequest} */ public static EnableCatalogJanitorRequest buildEnableCatalogJanitorRequest(boolean enable) { return EnableCatalogJanitorRequest.newBuilder().setEnable(enable).build(); }
3.68
querydsl_MathExpressions_degrees
/** * Create a {@code deg(num)} expression * * <p>Convert radians to degrees.</p> * * @param num numeric expression * @return deg(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> degrees(Expression<A> num) { return Expressions.numberOperation(Double.class, Ops.MathOps.DEG, nu...
3.68
querydsl_Expressions_anyOf
/** * Get the union of the given Boolean expressions * * @param exprs predicates * @return union of predicates */ public static BooleanExpression anyOf(BooleanExpression... exprs) { BooleanExpression rv = null; for (BooleanExpression b : exprs) { rv = rv == null ? b : rv.or(b); } return rv;...
3.68
flink_CommittableCollector_of
/** * Creates a {@link CommittableCollector} based on the current runtime information. This method * should be used for to instantiate a collector for all Sink V2. * * @param context holding runtime of information * @param metricGroup storing the committable metrics * @param <CommT> type of the committable * @re...
3.68
framework_AbstractComponentConnector_isRealUpdate
/** * Checks whether the update is 'real' or contains cached information. * * @param uidl * the UIDL to check * @return {@code true} if doesn't have "cached" attribute, {@code false} * otherwise */ @Deprecated public static boolean isRealUpdate(UIDL uidl) { return !uidl.hasAttribute("cache...
3.68
flink_FileSystem_loadHadoopFsFactory
/** * Utility loader for the Hadoop file system factory. We treat the Hadoop FS factory in a * special way, because we use it as a catch all for file systems schemes not supported directly * in Flink. * * <p>This method does a set of eager checks for availability of certain classes, to be able to * give better er...
3.68
hbase_RawCellBuilderFactory_create
/** Returns the cell that is created */ public static RawCellBuilder create() { return new KeyValueBuilder(); }
3.68
hudi_SixToFiveDowngradeHandler_syncCompactionRequestedFileToAuxiliaryFolder
/** * See HUDI-6040. */ private static void syncCompactionRequestedFileToAuxiliaryFolder(HoodieTable table) { HoodieTableMetaClient metaClient = table.getMetaClient(); HoodieTimeline compactionTimeline = new HoodieActiveTimeline(metaClient, false).filterPendingCompactionTimeline() .filter(instant -> instant...
3.68
hbase_HBaseTestingUtility_shutdownMiniDFSCluster
/** * Shuts down instance created by call to {@link #startMiniDFSCluster(int)} or does nothing. */ public void shutdownMiniDFSCluster() throws IOException { if (this.dfsCluster != null) { // The below throws an exception per dn, AsynchronousCloseException. this.dfsCluster.shutdown(); dfsCluster = null; ...
3.68
hbase_Encryption_encryptWithSubjectKey
/** * Encrypts a block of plaintext with the symmetric key resolved for the given subject * @param out ciphertext * @param in plaintext * @param conf configuration * @param cipher the encryption algorithm * @param iv the initialization vector, can be null */ public static void encryptWithSubjectKey(...
3.68
flink_EmbeddedRocksDBStateBackend_setRocksDBOptions
/** * Sets {@link org.rocksdb.Options} for the RocksDB instances. Because the options are not * serializable and hold native code references, they must be specified through a factory. * * <p>The options created by the factory here are applied on top of the pre-defined options * profile selected via {@link #setPred...
3.68
AreaShop_InfoCommand_getTypeOrder
/** * Get an integer to order by type, usable for Comparators. * @param region The region to get the order for * @return An integer for sorting by type */ private Integer getTypeOrder(GeneralRegion region) { if(region.getType() == GeneralRegion.RegionType.RENT) { if(region.getOwner() == null) { return 1; } ...
3.68
hbase_ReplicationThrottler_addPushSize
/** * Add current size to the current cycle's total push size * @param size is the current size added to the current cycle's total push size */ public void addPushSize(final long size) { if (this.enabled) { this.cyclePushSize += size; } }
3.68
hudi_BaseHoodieTableServiceClient_clean
/** * Clean up any stale/old files/data lying around (either on file storage or index storage) based on the * configurations and CleaningPolicy used. (typically files that no longer can be used by a running query can be * cleaned). This API provides the flexibility to schedule clean instant asynchronously via * {@l...
3.68
graphhopper_ShortestPathTree_setDistanceLimit
/** * Distance limit in meter */ public void setDistanceLimit(double limit) { exploreType = DISTANCE; this.limit = limit; this.queueByZ = new PriorityQueue<>(1000, comparingDouble(l -> l.distance)); }
3.68
hudi_BoundedInMemoryQueue_readNextRecord
/** * Reader interface but never exposed to outside world as this is a single consumer queue. Reading is done through a * singleton iterator for this queue. */ @Override public Option<O> readNextRecord() { if (this.isReadDone.get()) { return Option.empty(); } rateLimiter.release(); Option<O> newRecord =...
3.68
morf_Criterion_in
/** * Helper method to create a new "IN" expression. * * <blockquote> * <pre> * SelectStatement stmt = select() * .from(tableRef("Schedule")) * .where( * Criterion.in(field("chargeType"), 1, 2, 3) * ) * </pre> * </blockquote> * * <strong>Any null values returned by {@code selectStatement} * that...
3.68
framework_VTabsheet_updateDynamicWidth
/** * For internal use only. May be removed or replaced in the future. * * @see #isDynamicWidth() */ public void updateDynamicWidth() { // Find width consumed by tabs // spacer is a filler cell that covers the gap beside the tabs when // the content is wider than the collective width of the tabs (also ...
3.68
hbase_HFileArchiver_archiveStoreFiles
/** * Remove the store files, either by archiving them or outright deletion * @param conf {@link Configuration} to examine to determine the archive directory * @param fs the filesystem where the store files live * @param regionInfo {@link RegionInfo} of the region hosting the store files ...
3.68
hbase_BlockingRpcConnection_run
/** * Reads the call from the queue, write them on the socket. */ @Override public void run() { synchronized (BlockingRpcConnection.this) { while (!closed) { if (callsToWrite.isEmpty()) { // We should use another monitor object here for better performance since the read // thread also uses...
3.68
framework_VListSelect_getTabIndex
/** * Gets the tab index. * * @return the tab index */ public int getTabIndex() { return select.getTabIndex(); }
3.68
framework_Profiler_initialize
/** * Initializes the profiler. This should be done before calling any other * function in this class. Failing to do so might cause undesired behavior. * This method has no side effects if the initialization has already been * done. * <p> * Please note that this method should be called even if the profiler is not...
3.68
hbase_ZKUtil_listChildrenNoWatch
/** * Lists the children of the specified znode without setting any watches. Sets no watches at all, * this method is best effort. Returns an empty list if the node has no children. Returns null if * the parent node itself does not exist. * @param zkw zookeeper reference * @param znode node to get children * @r...
3.68
framework_ServerRpcQueue_isLegacyVariableChange
/** * Checks if the given method invocation represents a Vaadin 6 variable * change. * * @param invocation * the invocation to check * @return true if the method invocation is a legacy variable change, false * otherwise */ public static boolean isLegacyVariableChange(MethodInvocation invocati...
3.68
hbase_StoreFileScanner_seekBeforeAndSaveKeyToPreviousRow
/** * Seeks before the seek target cell and saves the location to {@link #previousRow}. If there * doesn't exist a KV in this file before the seek target cell, reposition the scanner at the * beginning of the storefile (in preparation to a reseek at or after the seek key) and set the * {@link #previousRow} to null....
3.68
hbase_ProcedureWALFormat_load
/** * Load all the procedures in these ProcedureWALFiles, and rebuild the given {@code tracker} if * needed, i.e, the {@code tracker} is a partial one. * <p/> * The method in the give {@code loader} will be called at the end after we load all the * procedures and construct the hierarchy. * <p/> * And we will cal...
3.68
querydsl_StringExpression_upper
/** * Create a {@code this.toUpperCase()} expression * * <p>Get the upper case form</p> * * @return this.toUpperCase() * @see java.lang.String#toUpperCase() */ public StringExpression upper() { if (upper == null) { upper = Expressions.stringOperation(Ops.UPPER, mixin); } return upper; }
3.68
dubbo_ServiceAnnotationPostProcessor_getServiceAnnotationAttributes
/** * Get dubbo service annotation class at java-config @bean method * @return return service annotation attributes map if found, or return null if not found. */ private Map<String, Object> getServiceAnnotationAttributes(BeanDefinition beanDefinition) { if (beanDefinition instanceof AnnotatedBeanDefinition) { ...
3.68
pulsar_ClientConfiguration_setTlsTrustCertsFilePath
/** * Set the path to the trusted TLS certificate file. * * @param tlsTrustCertsFilePath */ public void setTlsTrustCertsFilePath(String tlsTrustCertsFilePath) { confData.setTlsTrustCertsFilePath(tlsTrustCertsFilePath); }
3.68
dubbo_ReflectUtils_desc2name
/** * desc to name. * "[[I" => "int[][]" * * @param desc desc. * @return name. */ public static String desc2name(String desc) { StringBuilder sb = new StringBuilder(); int c = desc.lastIndexOf('[') + 1; if (desc.length() == c + 1) { switch (desc.charAt(c)) { case JVM_VOID: { ...
3.68
hadoop_FedBalance_setMap
/** * Max number of concurrent maps to use for copy. * @param value the map number of the distcp. */ public Builder setMap(int value) { this.map = value; return this; }
3.68
hudi_ExpressionPredicates_fromExpression
/** * Converts specific call expression to the predicate. * * <p>Two steps to bind the call: * 1. map the predicate instance; * 2. bind the field reference; * * <p>Normalize the expression to simplify the subsequent decision logic: * always put the literal expression in the RHS. * * @param callExpression The ...
3.68
hadoop_RecurrenceId_getRunId
/** * Return the runId for the pipeline job in one run. * * @return the runId. */ public final String getRunId() { return runId; }
3.68
hmily_TarsHmilyConfiguration_tarsHmilyStartupBean
/** * add TarsHmilyStartup. * * @return TarsHmilyStartup */ @Bean public TarsHmilyFilterStartupBean tarsHmilyStartupBean() { return new TarsHmilyFilterStartupBean(); }
3.68
pulsar_ConsumerConfigurationData_getMaxPendingChuckedMessage
/** * @deprecated use {@link #getMaxPendingChunkedMessage()} */ @Deprecated public int getMaxPendingChuckedMessage() { return maxPendingChunkedMessage; }
3.68
pulsar_SaslRoleToken_getSession
/** * Returns the authentication mechanism of the token. * * @return the authentication mechanism of the token. */ public String getSession() { return session; }
3.68
rocketmq-connect_ClusterConfigState_tasks
/** * Get the current set of task IDs for the specified connector. * * @param connectorName the name of the connector to look up task configs for * @return the current set of connector task IDs */ public List<ConnectorTaskId> tasks(String connectorName) { Integer numTasks = connectorTaskCounts.get(connectorNam...
3.68
hbase_ScannerContext_checkTimeLimit
/** * @param checkerScope The scope that the limit is being checked from. The time limit is always * checked against {@link EnvironmentEdgeManager.currentTime} * @return true when the limit is enforceable from the checker's scope and it has been reached */ boolean checkTimeLimit(LimitScope check...
3.68
querydsl_AbstractHibernateQuery_setCacheable
/** * Enable caching of this query result set. * @param cacheable Should the query results be cacheable? */ @SuppressWarnings("unchecked") public Q setCacheable(boolean cacheable) { this.cacheable = cacheable; return (Q) this; }
3.68
hbase_WindowMovingAverage_getNumberOfStatistics
/** Returns number of statistics */ protected int getNumberOfStatistics() { return lastN.length; }
3.68
framework_VTree_isSelected
/** * Is a node selected in the tree. * * @param treeNode * The node to check * @return */ public boolean isSelected(TreeNode treeNode) { return selectedIds.contains(treeNode.key); }
3.68
hudi_HoodieAvroDataBlock_deserializeRecords
// TODO (na) - Break down content into smaller chunks of byte [] to be GC as they are used @Override protected <T> ClosableIterator<HoodieRecord<T>> deserializeRecords(byte[] content, HoodieRecordType type) throws IOException { checkState(this.readerSchema != null, "Reader's schema has to be non-null"); checkArgume...
3.68
flink_TopNBuffer_lastElement
/** Returns the last record of the last Entry in the buffer. */ public RowData lastElement() { Map.Entry<RowData, Collection<RowData>> last = treeMap.lastEntry(); RowData lastElement = null; if (last != null) { Collection<RowData> collection = last.getValue(); lastElement = getLastElement(co...
3.68
flink_AsyncLookupFunction_eval
/** Invokes {@link #asyncLookup} and chains futures. */ public final void eval(CompletableFuture<Collection<RowData>> future, Object... keys) { GenericRowData keyRow = GenericRowData.of(keys); asyncLookup(keyRow) .whenComplete( (result, exception) -> { if ...
3.68
hadoop_CompressedWritable_ensureInflated
/** Must be called by all methods which access fields to ensure that the data * has been uncompressed. */ protected void ensureInflated() { if (compressed != null) { try { ByteArrayInputStream deflated = new ByteArrayInputStream(compressed); DataInput inflater = new DataInputStream(new Inflat...
3.68
cron-utils_WeekDay_mapTo
/** * Maps given WeekDay to representation hold by this instance. * * @param targetWeekDayDefinition - referred weekDay * @param dayOfWeek - day of week to be mapped. * Value corresponds to this instance mapping. * @return - int result */ public int mapTo(final int da...
3.68
hadoop_FileIoProvider_posixFadvise
/** * Call posix_fadvise on the given file descriptor. * * @param volume target volume. null if unavailable. */ public void posixFadvise( @Nullable FsVolumeSpi volume, String identifier, FileDescriptor outFd, long offset, long length, int flags) throws NativeIOException { final long begin = profilingEven...
3.68
flink_ScopeFormat_asVariable
/** * Formats the given string to resemble a scope variable. * * @param scope The string to format * @return The formatted string */ public static String asVariable(String scope) { return SCOPE_VARIABLE_PREFIX + scope + SCOPE_VARIABLE_SUFFIX; }
3.68
flink_MasterHooks_wrapHook
/** * Wraps a hook such that the user-code classloader is applied when the hook is invoked. * * @param hook the hook to wrap * @param userClassLoader the classloader to use */ public static <T> MasterTriggerRestoreHook<T> wrapHook( MasterTriggerRestoreHook<T> hook, ClassLoader userClassLoader) { retur...
3.68
flink_FeedbackTransformation_getWaitTime
/** * Returns the wait time. This is the amount of time that the feedback operator keeps listening * for feedback elements. Once the time expires the operation will close and will not receive * further elements. */ public Long getWaitTime() { return waitTime; }
3.68
morf_ArchiveDataSetWriter_reallyClose
/** * @see java.util.zip.ZipOutputStream#close() * @throws IOException If the exception is thrown from {@link ZipOutputStream#close()} */ public void reallyClose() throws IOException { super.close(); }
3.68
flink_MemorySegment_getOffHeapBuffer
/** * Returns the off-heap buffer of memory segments. * * @return underlying off-heap buffer * @throws IllegalStateException if the memory segment does not represent off-heap buffer */ public ByteBuffer getOffHeapBuffer() { if (offHeapBuffer != null) { return offHeapBuffer; } else { throw n...
3.68
hadoop_ManifestSuccessData_setSuccess
/** * Set the success flag. * @param success did the job succeed? */ public void setSuccess(boolean success) { this.success = success; }
3.68
hbase_LruBlockCache_cacheBlock
/** * Cache the block with the specified name and buffer. * <p> * TODO after HBASE-22005, we may cache an block which allocated from off-heap, but our LRU cache * sizing is based on heap size, so we should handle this in HBASE-22127. It will introduce an * switch whether make the LRU on-heap or not, if so we may n...
3.68
hadoop_FedBalanceContext_setMapNum
/** * The map number of the distcp job. * @param value the map number of the distcp. * @return the builder. */ public Builder setMapNum(int value) { this.mapNum = value; return this; }
3.68
hadoop_FullCredentialsTokenBinding_createTokenIdentifier
/** * Create a new delegation token. * * It's slightly inefficient to create a new one every time, but * it avoids concurrency problems with managing any singleton. * @param policy minimum policy to use, if known. * @param encryptionSecrets encryption secrets. * @return a DT identifier * @throws IOException fai...
3.68
hbase_CleanerChore_initCleanerChain
/** * Instantiate and initialize all the file cleaners set in the configuration * @param confKey key to get the file cleaner classes from the configuration */ private void initCleanerChain(String confKey) { this.cleanersChain = new ArrayList<>(); String[] cleaners = conf.getStrings(confKey); if (cleaners != nu...
3.68
hbase_WALUtil_writeCompactionMarker
/** * Write the marker that a compaction has succeeded and is about to be committed. This provides * info to the HMaster to allow it to recover the compaction if this regionserver dies in the * middle. It also prevents the compaction from finishing if this regionserver has already lost * its lease on the log. * <p...
3.68
framework_FocusUtil_setFocus
/** * Explicitly focus/unfocus the given widget. Only one widget can have focus * at a time, and the widget that does will receive all keyboard events. * * @param focusable * the widget to focus/unfocus * @param focus * whether this widget should take focus or release it */ public static v...
3.68
framework_VFilterSelect_selectLastItem
/** * @deprecated use {@link SuggestionPopup#selectLastItem()} instead. */ @Deprecated public void selectLastItem() { debug("VFS.SM: selectLastItem()"); List<MenuItem> items = getItems(); MenuItem lastItem = items.get(items.size() - 1); selectItem(lastItem); }
3.68
pulsar_AuthorizationProvider_allowNamespaceOperation
/** * @deprecated - will be removed after 2.12. Use async variant. */ @Deprecated default Boolean allowNamespaceOperation(NamespaceName namespaceName, String role, NamespaceOperation operation, Auth...
3.68
hadoop_IOStatisticsBinding_trackDurationOfOperation
/** * Given an IOException raising callable/lambda expression, * return a new one which wraps the inner and tracks * the duration of the operation, including whether * it passes/fails. * @param factory factory of duration trackers * @param statistic statistic key * @param input input callable. * @param <B> retu...
3.68
flink_SegmentsUtil_setInt
/** * set int from segments. * * @param segments target segments. * @param offset value offset. */ public static void setInt(MemorySegment[] segments, int offset, int value) { if (inFirstSegment(segments, offset, 4)) { segments[0].putInt(offset, value); } else { setIntMultiSegments(segments...
3.68
framework_TableQuery_executeQuery
/** * Executes the given query string using either the active connection if a * transaction is already open, or a new connection from this query's * connection pool. * * @param sh * an instance of StatementHelper, containing the query string * and parameter values. * @return ResultSet of t...
3.68
hbase_MasterObserver_postDeleteNamespace
/** * Called after the deleteNamespace operation has been requested. * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace */ default void postDeleteNamespace(final ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws IOExc...
3.68
morf_AbstractSqlDialectTest_testTemporaryCreateTableStatements
/** * Tests the SQL for creating tables. */ @SuppressWarnings("unchecked") @Test public void testTemporaryCreateTableStatements() { compareStatements( expectedCreateTemporaryTableStatements(), testDialect.tableDeploymentStatements(testTempTable), testDialect.tableDeploymentStatements(alternateTestTempTa...
3.68
flink_BootstrapTransformation_getMaxParallelism
/** @return The max parallelism for this operator. */ int getMaxParallelism(int globalMaxParallelism) { return operatorMaxParallelism.orElse(globalMaxParallelism); }
3.68
hadoop_FederationUtil_newFileSubclusterResolver
/** * Creates an instance of a FileSubclusterResolver from the configuration. * * @param conf Configuration that defines the file resolver class. * @param router Router service. * @return New file subcluster resolver. */ public static FileSubclusterResolver newFileSubclusterResolver( Configuration conf, Route...
3.68
hudi_HoodieCombineHiveInputFormat_getPartitionFromPath
/** * HiveFileFormatUtils.getPartitionDescFromPathRecursively is no longer available since Hive 3. * This method is to make it compatible with both Hive 2 and Hive 3. * @param pathToPartitionInfo * @param dir * @param cacheMap * @return * @throws IOException */ private static PartitionDesc getPartitionFromPath(...
3.68
streampipes_AssetLinkBuilder_create
/** * Static method to create a new instance of AssetLinkBuilder. * * @return A new instance of AssetLinkBuilder. */ public static AssetLinkBuilder create() { return new AssetLinkBuilder(); }
3.68
hbase_ZKUtil_getNodeName
/** * Get the name of the current node from the specified fully-qualified path. * @param path fully-qualified path * @return name of the current node */ public static String getNodeName(String path) { return path.substring(path.lastIndexOf("/") + 1); }
3.68
hudi_UtilHelpers_tableExists
/** * Returns true if the table already exists in the JDBC database. */ private static Boolean tableExists(Connection conn, Map<String, String> options) throws SQLException { JdbcDialect dialect = JdbcDialects.get(options.get(JDBCOptions.JDBC_URL())); try (PreparedStatement statement = conn.prepareStatement(diale...
3.68
framework_VTransferable_setDragSource
/** * Sets the component currently being dragged or from which the transferable * is created (e.g. a tree which node is dragged). * <p> * The server side counterpart of the component may implement * {@link DragSource} interface if it wants to translate or complement the * server side instance of this Transferable...
3.68
hadoop_TFile_getRecordNum
/** * Get the RecordNum corresponding to the entry pointed by the cursor. * @return The RecordNum corresponding to the entry pointed by the cursor. * @throws IOException raised on errors performing I/O. */ public long getRecordNum() throws IOException { return reader.getRecordNumByLocation(currentLocation); }
3.68
rocketmq-connect_ProcessingContext_sourceRecord
/** * Set the source record being processed in the connect pipeline. * * @param record the source record */ public void sourceRecord(ConnectRecord record) { this.sourceRecord = record; reset(); }
3.68
flink_DataSinkTask_initInputReaders
/** * Initializes the input readers of the DataSinkTask. * * @throws RuntimeException Thrown in case of invalid task input configuration. */ @SuppressWarnings("unchecked") private void initInputReaders() throws Exception { int numGates = 0; // ---------------- create the input readers ---------------------...
3.68
flink_ExceptionUtils_firstOrSuppressed
/** * Adds a new exception as a {@link Throwable#addSuppressed(Throwable) suppressed exception} to * a prior exception, or returns the new exception, if no prior exception exists. * * <pre>{@code * public void closeAllThings() throws Exception { * Exception ex = null; * try { * component.shutdow...
3.68
hadoop_MultipleOutputFormat_generateActualKey
/** * Generate the actual key from the given key/value. The default behavior is that * the actual key is equal to the given key * * @param key * the key of the output data * @param value * the value of the output data * @return the actual key derived from the given key/value */ protected K g...
3.68
hudi_BaseCommitActionExecutor_saveWorkloadProfileMetadataToInflight
/** * Save the workload profile in an intermediate file (here re-using commit files) This is useful when performing * rollback for MOR tables. Only updates are recorded in the workload profile metadata since updates to log blocks * are unknown across batches Inserts (which are new parquet files) are rolled back base...
3.68
hadoop_BlockManager_get
/** * Gets the block having the given {@code blockNumber}. * * The entire block is read into memory and returned as a {@code BufferData}. * The blocks are treated as a limited resource and must be released when * one is done reading them. * * @param blockNumber the number of the block to be read and returned. *...
3.68
framework_ContainerEventProvider_listenToContainerEvents
/** * Attaches listeners to the container so container events can be processed */ private void listenToContainerEvents() { if (container instanceof ItemSetChangeNotifier) { ((ItemSetChangeNotifier) container).addItemSetChangeListener(this); } if (container instanceof ValueChangeNotifier) { ...
3.68
flink_ZooKeeperStateHandleStore_get
/** * Gets a state handle from ZooKeeper and optionally locks it. * * @param pathInZooKeeper Path in ZooKeeper to get the state handle from * @param lock True if we should lock the node; otherwise false * @return The state handle * @throws IOException Thrown if the method failed to deserialize the stored state ha...
3.68
hbase_ZKWatcher_checkAndSetZNodeAcls
/** * On master start, we check the znode ACLs under the root directory and set the ACLs properly if * needed. If the cluster goes from an unsecure setup to a secure setup, this step is needed so * that the existing znodes created with open permissions are now changed with restrictive perms. */ public void checkAnd...
3.68