name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hmily_GrpcHmilyContext_removeAfterInvoke
/** * remove hmily conext after invoke. * */ public static void removeAfterInvoke() { GrpcHmilyContext.getHmilyClass().remove(); }
3.68
framework_AbstractComponentContainer_removeComponentAttachListener
/* documented in interface */ @Override @Deprecated public void removeComponentAttachListener( ComponentAttachListener listener) { removeListener(ComponentAttachEvent.class, listener, ComponentAttachListener.attachMethod); }
3.68
hudi_Transient_lazy
/** * Creates instance of {@link Transient} by lazily executing provided {@code initializer}, * to instantiate value of type {@link T}. Same initializer will be used to re-instantiate * the value after original one being dropped during serialization/deserialization cycle */ public static <T> Transient<T> lazy(Seria...
3.68
hadoop_LocalTempDir_tempPath
/** * Get a temporary path. * @param conf configuration to use when creating the allocator * @param prefix filename prefix * @param size file size, or -1 if not known * @return the temp path. * @throws IOException IO failure */ public static Path tempPath(Configuration conf, String prefix, long size) throws ...
3.68
framework_GridElement_save
/** * Saves the fields of this editor. * <p> * <em>Note:</em> that this closes the editor making this element * useless. */ public void save() { findElement(By.className("v-grid-editor-save")).click(); }
3.68
hadoop_S3AReadOpContext_getReadahead
/** * Get the readahead for this operation. * @return a value {@literal >=} 0 */ public long getReadahead() { return readahead; }
3.68
querydsl_GenericExporter_setNameSuffix
/** * Set the name suffix * * @param suffix */ public void setNameSuffix(String suffix) { codegenModule.bind(CodegenModule.SUFFIX, suffix); }
3.68
flink_ExtractionUtils_hasInvokableConstructor
/** * Checks for an invokable constructor matching the given arguments. * * @see #isInvokable(Executable, Class[]) */ public static boolean hasInvokableConstructor(Class<?> clazz, Class<?>... classes) { for (Constructor<?> constructor : clazz.getDeclaredConstructors()) { if (isInvokable(constructor, cla...
3.68
hadoop_PendingSet_getCommits
/** * @return commit list. */ public List<SinglePendingCommit> getCommits() { return commits; }
3.68
rocketmq-connect_ServiceProviderUtil_getConfigManagementService
/** * Get config management service by class name * * @param configManagementServiceClazz * @return */ @NotNull public static ConfigManagementService getConfigManagementService(String configManagementServiceClazz) { if (StringUtils.isEmpty(configManagementServiceClazz)) { configManagementServiceClazz =...
3.68
hudi_FlinkOptions_flatOptions
/** * Collects all the config options, the 'properties.' prefix would be removed if the option key starts with it. */ public static Configuration flatOptions(Configuration conf) { final Map<String, String> propsMap = new HashMap<>(); conf.toMap().forEach((key, value) -> { final String subKey = key.startsWith...
3.68
hbase_Mutation_checkRow
/** * @param row Row to check * @throws IllegalArgumentException Thrown if <code>row</code> is empty or null or &gt; * {@link HConstants#MAX_ROW_LENGTH} * @return <code>row</code> */ static byte[] checkRow(final byte[] row, final int offset, final int length) { if (row == null) {...
3.68
flink_TableDescriptor_forConnector
/** * Creates a new {@link Builder} for a table using the given connector. * * @param connector The factory identifier for the connector. */ public static Builder forConnector(String connector) { Preconditions.checkNotNull(connector, "Table descriptors require a connector identifier."); final Builder descri...
3.68
hadoop_RouterDelegationTokenSecretManager_getTokenByRouterStoreToken
/** * Get RMDelegationTokenIdentifier according to RouterStoreToken. * * @param identifier RMDelegationTokenIdentifier * @return RMDelegationTokenIdentifier * @throws YarnException An internal conversion error occurred when getting the Token * @throws IOException IO exception occurred */ public RMDelegationToken...
3.68
hadoop_SolverPreprocessor_aggregateSkylines
/** * Aggregate all job's {@link ResourceSkyline}s in the one run of recurring * pipeline, and return the aggregated {@link ResourceSkyline}s in different * runs. * * @param jobHistory the history {@link ResourceSkyline} of the recurring * pipeline job. * @param minJobRuns the minimum number of...
3.68
hmily_DubboHmilyInventoryApplication_main
/** * main. * * @param args args */ public static void main(final String[] args) { SpringApplication springApplication = new SpringApplication(DubboHmilyInventoryApplication.class); springApplication.setWebApplicationType(WebApplicationType.NONE); springApplication.run(args); }
3.68
hbase_DirectMemoryUtils_destroyDirectByteBuffer
/** * DirectByteBuffers are garbage collected by using a phantom reference and a reference queue. * Every once a while, the JVM checks the reference queue and cleans the DirectByteBuffers. * However, as this doesn't happen immediately after discarding all references to a * DirectByteBuffer, it's easy to OutOfMemory...
3.68
framework_MenuBarsWithNesting_createFirstMenuBar
/* * Returns a menu bar with three levels of nesting but no icons. */ private MenuBar createFirstMenuBar() { MenuBar menuBar = new MenuBar(); MenuItem file = menuBar.addItem("File", null); file.addItem("Open", selectionCommand); file.addItem("Save", selectionCommand); file.addItem("Save As..", sel...
3.68
hudi_MarkerDirState_getPendingMarkerCreationRequests
/** * @param shouldClear Should clear the internal request list or not. * @return futures of pending marker creation requests. */ public List<MarkerCreationFuture> getPendingMarkerCreationRequests(boolean shouldClear) { List<MarkerCreationFuture> pendingFutures; synchronized (markerCreationFutures) { if (mar...
3.68
hbase_TableInputFormat_addColumn
/** * Parses a combined family and qualifier and adds either both or just the family in case there is * no qualifier. This assumes the older colon divided notation, e.g. "family:qualifier". * @param scan The Scan to update. * @param familyAndQualifier family and qualifier * @throws IllegalArgumentExc...
3.68
hadoop_XAttrStorage_readINodeXAttrs
/** * Reads the existing extended attributes of an inode. * <p> * Must be called while holding the FSDirectory read lock. * * @param inodeAttr INodeAttributes to read. * @return {@code XAttr} list. */ public static List<XAttr> readINodeXAttrs(INodeAttributes inodeAttr) { XAttrFeature f = inodeAttr.getXAttrFeat...
3.68
hbase_Scan_getTimeRange
/** Returns TimeRange */ public TimeRange getTimeRange() { return this.tr; }
3.68
hudi_HoodieFlinkCompactor_start
/** * Main method to start compaction service. */ public void start(boolean serviceMode) throws Exception { if (serviceMode) { compactionScheduleService.start(null); try { compactionScheduleService.waitForShutdown(); } catch (Exception e) { throw new HoodieException(e.getMessage(), e); }...
3.68
flink_ExecutionFailureHandler_getFailureHandlingResult
/** * Return result of failure handling. Can be a set of task vertices to restart and a delay of * the restarting. Or that the failure is not recoverable and the reason for it. * * @param failedExecution is the failed execution * @param cause of the task failure * @param timestamp of the task failure * @return r...
3.68
hibernate-validator_GetDeclaredMethodHandle_andMakeAccessible
/** * Before using this method on arbitrary classes, you need to check the {@code HibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS} * permission against the security manager, if the calling class exposes the handle to clients. */ public static GetDeclaredMethodHandle andMakeAccessible(Lookup lookup, Class<?> claz...
3.68
druid_IbatisUtils_getId
/** * 通过反射的方式得到id,能够兼容2.3.0和2.3.4 * * @return */ protected static String getId(Object statement) { try { if (methodGetId == null) { Class<?> clazz = statement.getClass(); methodGetId = clazz.getMethod("getId"); } Object returnValue = methodGetId.invoke(statement)...
3.68
hbase_Operation_toString
/** * Produces a string representation of this Operation. It defaults to a JSON representation, but * falls back to a string representation of the fingerprint and details in the case of a JSON * encoding failure. */ @Override public String toString() { return toString(DEFAULT_MAX_COLS); }
3.68
hadoop_IncrementalBlockReportManager_putMissing
/** * Put the all blocks to this IBR unless the block already exists. * @param rdbis list of blocks to add. * @return the number of missing blocks added. */ int putMissing(ReceivedDeletedBlockInfo[] rdbis) { int count = 0; for (ReceivedDeletedBlockInfo rdbi : rdbis) { if (!blocks.containsKey(rdbi.getBlock()...
3.68
hadoop_WriteOperationHelper_initiateMultiPartUpload
/** * {@inheritDoc} */ @Retries.RetryTranslated public String initiateMultiPartUpload( final String destKey, final PutObjectOptions options) throws IOException { LOG.debug("Initiating Multipart upload to {}", destKey); try (AuditSpan span = activateAuditSpan()) { return retry("initiate MultiPartUp...
3.68
flink_FineGrainedSlotManager_checkResourceRequirementsWithDelay
/** * Depending on the implementation of {@link ResourceAllocationStrategy}, checking resource * requirements and potentially making a re-allocation can be heavy. In order to cover more * changes with each check, thus reduce the frequency of unnecessary re-allocations, the checks * are performed with a slight delay...
3.68
hadoop_MagicCommitTracker_aboutToComplete
/** * Complete operation: generate the final commit data, put it. * @param uploadId Upload ID * @param parts list of parts * @param bytesWritten bytes written * @param iostatistics nullable IO statistics * @return false, indicating that the commit must fail. * @throws IOException any IO problem. * @throws Illeg...
3.68
shardingsphere-elasticjob_JobConfiguration_overwrite
/** * Set whether overwrite local configuration to registry center when job startup. * * <p> * If overwrite enabled, every startup will use local configuration. * </p> * * @param overwrite whether overwrite local configuration to registry center when job startup * @return ElasticJob configuration builder */...
3.68
flink_CoGroupOperator_sortFirstGroup
/** * Sorts Pojo or {@link org.apache.flink.api.java.tuple.Tuple} elements within a * group in the first input on the specified field in the specified {@link Order}. * * <p>Groups can be sorted by multiple fields by chaining {@link * #sortFirstGroup(String, Order)} calls. * * @param fieldExpression The expressio...
3.68
hudi_HoodieBackedTableMetadataWriter_prepRecords
/** * Tag each record with the location in the given partition. * The record is tagged with respective file slice's location based on its record key. */ protected HoodieData<HoodieRecord> prepRecords(Map<MetadataPartitionType, HoodieData<HoodieRecord>> partitionRecordsMap) { // The result set HoodieData<Hood...
3.68
flink_RocksDBMemoryControllerUtils_validateArenaBlockSize
/** * RocksDB starts flushing the active memtable constantly in the case when the arena block size * is greater than mutable limit (as calculated in {@link #calculateRocksDBMutableLimit(long)}). * * <p>This happens because in such a case the check <a * href="https://github.com/dataArtisans/frocksdb/blob/958f191d3f...
3.68
benchmark_DistributedWorkersEnsemble_getNumberOfProducerWorkers
/* * For driver-jms extra consumers are required. If there is an odd number of workers then allocate the extra * to consumption. */ @VisibleForTesting static int getNumberOfProducerWorkers(List<Worker> workers, boolean extraConsumerWorkers) { return extraConsumerWorkers ? (workers.size() + 2) / 3 : workers.size(...
3.68
hbase_AccessChecker_requireNamespacePermission
/** * Checks that the user has the given global or namespace permission. * @param user Active user to which authorization checks should be applied * @param request Request type * @param namespace The given namespace * @param tableName Table requested * @param familyMap Column family map requested...
3.68
framework_VScrollTable_getNavigationRightKey
/** * Get the key that scroll to the right on the table. By default it is the * right arrow key but by overriding this you can change the key to whatever * you want. * * @return The keycode of the key */ protected int getNavigationRightKey() { return KeyCodes.KEY_RIGHT; }
3.68
pulsar_TopicName_getTopicPartitionNameString
/** * A helper method to get a partition name of a topic in String. * @return topic + "-partition-" + partition. */ public static String getTopicPartitionNameString(String topic, int partitionIndex) { return topic + PARTITIONED_TOPIC_SUFFIX + partitionIndex; }
3.68
framework_Page_addBrowserWindowResizeListener
/** * Adds a new {@link BrowserWindowResizeListener} to this UI. The listener * will be notified whenever the browser window within which this UI resides * is resized. * <p> * In most cases, the UI should be in lazy resize mode when using browser * window resize listeners. Otherwise, a large number of events can ...
3.68
flink_AbstractMergeOuterJoinIterator_callWithNextKey
/** * Calls the <code>JoinFunction#join()</code> method for all two key-value pairs that share the * same key and come from different inputs. Furthermore, depending on the outer join type (LEFT, * RIGHT, FULL), all key-value pairs where no matching partner from the other input exists are * joined with null. The out...
3.68
flink_AvroUtils_getAvroUtils
/** * Returns either the default {@link AvroUtils} which throw an exception in cases where Avro * would be needed or loads the specific utils for Avro from flink-avro. */ public static AvroUtils getAvroUtils() { // try and load the special AvroUtils from the flink-avro package try { Class<?> clazz = ...
3.68
flink_RouteResult_decodedPath
/** Returns the decoded request path. */ public String decodedPath() { return decodedPath; }
3.68
zxing_State_addBinaryShiftChar
// Create a new state representing this state, but an additional character // output in Binary Shift mode. State addBinaryShiftChar(int index) { Token token = this.token; int mode = this.mode; int bitCount = this.bitCount; if (this.mode == HighLevelEncoder.MODE_PUNCT || this.mode == HighLevelEncoder.MODE_DIGIT)...
3.68
hudi_PartialBindVisitor_visitNameReference
/** * If the attribute cannot find from the schema, directly return null, visitPredicate * will handle it. */ @Override public Expression visitNameReference(NameReference attribute) { Types.Field field = caseSensitive ? recordType.fieldByName(attribute.getName()) : recordType.fieldByNameCaseInsensitive...
3.68
dubbo_JValidatorNew_generateMethodParameterClass
/** * try to generate methodParameterClass. * * @param clazz interface class * @param method invoke method * @param parameterClassName generated parameterClassName * @return Class<?> generated methodParameterClass */ private static Class<?> generateMethodParameterClass(Class<?> clazz, Me...
3.68
framework_VAbstractCalendarPanel_getDateTimeService
/** * Returns date time service for the widget. * * @see #setDateTimeService(DateTimeService) * * @return date time service */ protected DateTimeService getDateTimeService() { return dateTimeService; }
3.68
graphhopper_EdgeIterator_isValid
/** * Checks if a given integer edge ID is valid or not. Edge IDs >= 0 are considered valid, while negative * values are considered as invalid. However, some negative values are used as special values, e.g. {@link * #NO_EDGE}. */ public static boolean isValid(int edgeId) { return edgeId >= 0; }
3.68
flink_DefaultCompletedCheckpointStore_addCheckpointAndSubsumeOldestOne
/** * Synchronously writes the new checkpoints to state handle store and asynchronously removes * older ones. * * @param checkpoint Completed checkpoint to add. * @throws PossibleInconsistentStateException if adding the checkpoint failed and leaving the * system in a possibly inconsistent state, i.e. it's unc...
3.68
framework_ComponentConnectorLayoutSlot_reportActualRelativeWidth
/** * Reports the expected outer width to the LayoutManager. * * @param allocatedWidth * the width to set (including margins, borders and paddings) in * pixels */ @Override protected void reportActualRelativeWidth(int allocatedWidth) { getLayoutManager().reportOuterWidth(child, allocated...
3.68
hbase_ParseFilter_parseSimpleFilterExpression
/** * Constructs a filter object given a simple filter expression * <p> * @param filterStringAsByteArray filter string given by the user * @return filter object we constructed */ public Filter parseSimpleFilterExpression(byte[] filterStringAsByteArray) throws CharacterCodingException { String filterName = Byt...
3.68
framework_GridDragSource_getDragDataGenerator
/** * Returns the drag data generator function for the given type. * * @param type * Type of the generated data. * @return Drag data generator function for the given type. */ public SerializableFunction<T, String> getDragDataGenerator(String type) { return generatorFunctions.get(type); }
3.68
hbase_HRegion_newHRegion
// Utility methods /** * A utility method to create new instances of HRegion based on the {@link HConstants#REGION_IMPL} * configuration property. * @param tableDir qualified path of directory where region should be located, usually the table * directory. * @param wal The WAL is the outb...
3.68
druid_MySqlSchemaStatVisitor_visit
// DUAL public boolean visit(MySqlDeleteStatement x) { if (repository != null && x.getParent() == null) { repository.resolve(x); } SQLTableSource from = x.getFrom(); if (from != null) { from.accept(this); } SQLTableSource using = x.getUsing(); if (using != null)...
3.68
flink_UserDefinedFunction_functionIdentifier
/** Returns a unique, serialized representation for this function. */ public final String functionIdentifier() { final String className = getClass().getName(); if (isClassNameSerializable(this)) { return className; } final String md5 = EncodingUtils.hex(EncodingUtils.md5(EncodingUtil...
3.68
flink_InputSelection_build
/** * Build normalized mask, if all inputs were manually selected, inputMask will be normalized * to -1. */ public InputSelection build(int inputCount) { long allSelectedMask = (1L << inputCount) - 1; if (inputMask == allSelectedMask) { inputMask = -1; } else if (inputMask > allSelectedMask) { ...
3.68
morf_FieldFromSelect_getSelectStatement
/** * @return the selectStatement */ public SelectStatement getSelectStatement() { return selectStatement; }
3.68
flink_FlinkContainersSettings_isBuildFromFlinkDist
/** * Returns whether to build from flink-dist or from an existing base container. Also see the * {@code baseImage} property. */ public Boolean isBuildFromFlinkDist() { return buildFromFlinkDist; }
3.68
framework_ContainerOrderedWrapper_removeAllItems
/** * Removes all items from the underlying container and from the ordering. * * @return <code>true</code> if the operation succeeded, otherwise * <code>false</code> * @throws UnsupportedOperationException * if the removeAllItems is not supported. */ @Override public boolean removeAllItems() ...
3.68
pulsar_Topics_createPartitionedTopic
/** * Create a partitioned topic. * <p/> * Create a partitioned topic. It needs to be called before creating a producer for a partitioned topic. * <p/> * * @param topic * Topic name * @param numPartitions * Number of partitions to create of the topic * @throws PulsarAdminException */ de...
3.68
flink_PartitionTimeCommitPredicate_watermarkHasPassedWithDelay
/** * Returns the watermark has passed the partition time or not, if true means it's time to commit * the partition. */ private boolean watermarkHasPassedWithDelay( long watermark, LocalDateTime partitionTime, long commitDelay) { // here we don't parse the long watermark to TIMESTAMP and then comparison,...
3.68
rocketmq-connect_JdbcSourceTask_getContext
// Common context private QueryContext getContext(String querySuffix, String tableOrQuery, String topicPrefix, QueryMode queryMode) { QueryContext context = new QueryContext( queryMode, queryMode == QueryMode.TABLE ? dialect.parseTableNameToTableId(tableOrQuery) : null, queryMode == QueryMod...
3.68
flink_StopWithSavepointTerminationHandlerImpl_terminateExceptionally
/** * Handles the termination of the {@code StopWithSavepointTerminationHandler} exceptionally * without triggering a global job fail-over but restarting the checkpointing. It does restart * the checkpoint scheduling. * * @param throwable the error that caused the exceptional termination. */ private void terminat...
3.68
hadoop_RollingFileSystemSink_loadConf
/** * Return the supplied configuration for testing or otherwise load a new * configuration. * * @return the configuration to use */ private Configuration loadConf() { Configuration c; if (suppliedConf != null) { c = suppliedConf; } else { // The config we're handed in init() isn't the one we want h...
3.68
morf_H2Dialect_indexDropStatements
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#indexDropStatements(org.alfasoftware.morf.metadata.Table, * org.alfasoftware.morf.metadata.Index) */ @Override public Collection<String> indexDropStatements(Table table, Index indexToBeRemoved) { return Arrays.asList("DROP INDEX " + indexToBeRemoved.getName());...
3.68
framework_AbstractTextField_getCursorPosition
/** * Returns the last known cursor position of the field. * * @return the last known cursor position */ public int getCursorPosition() { return lastKnownCursorPosition; }
3.68
flink_CheckpointConfig_setMinPauseBetweenCheckpoints
/** * Sets the minimal pause between checkpointing attempts. This setting defines how soon the * checkpoint coordinator may trigger another checkpoint after it becomes possible to trigger * another checkpoint with respect to the maximum number of concurrent checkpoints (see {@link * #setMaxConcurrentCheckpoints(int...
3.68
flink_RankProcessStrategy_analyzeRankProcessStrategies
/** Gets {@link RankProcessStrategy} based on input, partitionKey and orderKey. */ static List<RankProcessStrategy> analyzeRankProcessStrategies( StreamPhysicalRel rank, ImmutableBitSet partitionKey, RelCollation orderKey) { FlinkRelMetadataQuery mq = (FlinkRelMetadataQuery) rank.getCluster().getMetadataQu...
3.68
hbase_FSTableDescriptors_getAll
/** * Returns a map from table name to table descriptor for all tables. */ @Override public Map<String, TableDescriptor> getAll() throws IOException { Map<String, TableDescriptor> tds = new ConcurrentSkipListMap<>(); if (fsvisited) { for (Map.Entry<TableName, TableDescriptor> entry : this.cache.entrySet()) { ...
3.68
flink_AbstractCatalogStore_close
/** Closes the catalog store. */ @Override public void close() { isOpen = false; }
3.68
graphhopper_MinHeapWithUpdate_peekValue
/** * @return the value of the next element to be polled */ public float peekValue() { return vals[1]; }
3.68
hbase_HRegion_createRegionDir
/** * Create the region directory in the filesystem. */ public static HRegionFileSystem createRegionDir(Configuration configuration, RegionInfo ri, Path rootDir) throws IOException { FileSystem fs = rootDir.getFileSystem(configuration); Path tableDir = CommonFSUtils.getTableDir(rootDir, ri.getTable()); // If ...
3.68
framework_PushConfiguration_getParameter
/* * (non-Javadoc) * * @see com.vaadin.ui.PushConfiguration#getParameter(java.lang.String) */ @Override public String getParameter(String parameter) { return getState(false).parameters.get(parameter); }
3.68
pulsar_ResourceGroupService_getPublishRateLimiters
// Visibility for testing. protected BytesAndMessagesCount getPublishRateLimiters (String rgName) throws PulsarAdminException { ResourceGroup rg = this.getResourceGroupInternal(rgName); if (rg == null) { throw new PulsarAdminException("Resource group does not exist: " + rgName); } return rg.get...
3.68
hmily_AbstractHmilyDatabase_executeUpdate
/** * Execute update int. * * @param sql the sql * @param params the params * @return the int */ private int executeUpdate(final String sql, final Object... params) { try (Connection con = dataSource.getConnection(); PreparedStatement ps = createPreparedStatement(con, sql, params)) { retur...
3.68
flink_ResultRetryStrategy_fixedDelayRetry
/** Create a fixed-delay retry strategy by given params. */ public static ResultRetryStrategy fixedDelayRetry( int maxAttempts, long backoffTimeMillis, Predicate<Collection<RowData>> resultPredicate) { return new ResultRetryStrategy( new AsyncRetryStrategies.FixedDelayRetryStrate...
3.68
flink_RawFormatFactory_validateAndExtractSingleField
/** Validates and extract the single field type from the given physical row schema. */ private static LogicalType validateAndExtractSingleField(RowType physicalRowType) { if (physicalRowType.getFieldCount() != 1) { String schemaString = physicalRowType.getFields().stream() ...
3.68
flink_HiveParserQBParseInfo_setSortByExprForClause
/** Set the Sort By AST for the clause. */ public void setSortByExprForClause(String clause, HiveParserASTNode ast) { destToSortby.put(clause, ast); }
3.68
flink_Tuple22_setFields
/** * Sets new values to all fields of the tuple. * * @param f0 The value for field 0 * @param f1 The value for field 1 * @param f2 The value for field 2 * @param f3 The value for field 3 * @param f4 The value for field 4 * @param f5 The value for field 5 * @param f6 The value for field 6 * @param f7 The valu...
3.68
framework_VAbstractTextualDate_createFormatString
/** * Create a format string suitable for the widget in its current state. * * @return a date format string to use when formatting and parsing the text * in the input field * @since 8.1 */ protected String createFormatString() { if (isYear(getCurrentResolution())) { return "yyyy"; // force ful...
3.68
streampipes_BoilerpipeHTMLContentHandler_endElement
// @Override public void endElement(String uri, String localName, String qName) throws SAXException { TagAction ta = tagActions.get(localName); if (ta != null) { flush = ta.end(this, localName, qName) | flush; } else { flush = true; } if (ta == null || ta.changesTagLevel()) { tagLevel--; } i...
3.68
hudi_MarkerUtils_readMarkerType
/** * Reads the marker type from `MARKERS.type` file. * * @param fileSystem file system to use. * @param markerDir marker directory. * @return the marker type, or empty if the marker type file does not exist. */ public static Option<MarkerType> readMarkerType(FileSystem fileSystem, String markerDir) { Path mar...
3.68
framework_AbsoluteLayout_getLeftValue
/** * Gets the 'left' attributes value using current units. * * @return The value of the 'left' attribute, null if not set * @see #getLeftUnits() */ public Float getLeftValue() { return leftValue; }
3.68
morf_DatabaseDataSetProducer_getSchema
/** * @see org.alfasoftware.morf.dataset.DataSetProducer#getSchema() */ @Override public Schema getSchema() { if (connection == null) { throw new IllegalStateException("Dataset has not been opened"); } if (schema == null) { // we use the same connection as this provider, so there is no (extra) clean-u...
3.68
hbase_Mutation_setACL
/** * Set the ACL for this operation. * @param perms A map of permissions for a user or users */ public Mutation setACL(Map<String, Permission> perms) { ListMultimap<String, Permission> permMap = ArrayListMultimap.create(); for (Map.Entry<String, Permission> entry : perms.entrySet()) { permMap.put(entry.getK...
3.68
morf_HumanReadableStatementHelper_generateRenameTableString
/** * @param from - The table name to change from * @param to - The table name to change to * @return a string containing the human-readable version of the action */ public static String generateRenameTableString(String from, String to) { StringBuilder renameTableBuilder = new StringBuilder(); renameTableBuilde...
3.68
flink_BinarySegmentUtils_equals
/** * Equals two memory segments regions. * * @param segments1 Segments 1 * @param offset1 Offset of segments1 to start equaling * @param segments2 Segments 2 * @param offset2 Offset of segments2 to start equaling * @param len Length of the equaled memory region * @return true if equal, false otherwise */ publ...
3.68
flink_OperationExpressionsUtils_extractAggregationsAndProperties
/** * Extracts and deduplicates all aggregation and window property expressions (zero, one, or * more) from the given expressions. * * @param expressions a list of expressions to extract * @return a Tuple2, the first field contains the extracted and deduplicated aggregations, and * the second field contains t...
3.68
framework_Panel_removeClickListener
/** * Remove a click listener from the Panel. The listener should earlier have * been added using {@link #addClickListener(ClickListener)}. * * @param listener * The listener to remove * @deprecated As of 8.0, replaced by {@link Registration#remove()} in the * registration object returned ...
3.68
hbase_PrivateCellUtil_compareRow
/** * Compare cell's row against given comparator * @param cell the cell to use for comparison * @param comparator the {@link CellComparator} to use for comparison * @return result comparing cell's row */ public static int compareRow(Cell cell, ByteArrayComparable comparator) { if (cell instanceof ByteBuff...
3.68
hbase_RSGroupBasedLoadBalancer_balanceCluster
/** * Balance by RSGroup. */ @Override public synchronized List<RegionPlan> balanceCluster( Map<TableName, Map<ServerName, List<RegionInfo>>> loadOfAllTable) throws IOException { if (!isOnline()) { throw new ConstraintException( RSGroupInfoManager.class.getSimpleName() + " is not online, unable to perfo...
3.68
hadoop_ClientThrottlingIntercept_responseReceived
/** * Called after the Azure Storage SDK receives a response. Client-side * throttling uses this to collect metrics. * * @param event The connection, operation, and request state. */ public static void responseReceived(ResponseReceivedEvent event) { updateMetrics((HttpURLConnection) event.getConnectionObject(), ...
3.68
hudi_SparkRDDReadClient_readROView
/** * Given a bunch of hoodie keys, fetches all the individual records out as a data frame. * * @return a dataframe */ public Dataset<Row> readROView(JavaRDD<HoodieKey> hoodieKeys, int parallelism) { assertSqlContext(); JavaPairRDD<HoodieKey, Option<Pair<String, String>>> lookupResultRDD = checkExists(hoodieKey...
3.68
hbase_ByteBufferUtils_readAsInt
/** * Converts a ByteBuffer to an int value * @param buf The ByteBuffer * @param offset Offset to int value * @param length Number of bytes used to store the int value. * @return the int value if there's not enough bytes left in the buffer after the given offset */ public static int readAsInt(ByteBuffer buf, i...
3.68
hmily_HmilyActionEnum_acquireByCode
/** * Acquire by code tcc action enum. * * @param code the code * @return the tcc action enum */ public static HmilyActionEnum acquireByCode(final int code) { return Arrays.stream(HmilyActionEnum.values()) .filter(v -> Objects.equals(v.getCode(), code)) .findFirst().orEl...
3.68
flink_TableSinkBase_getFieldNames
/** Returns the field names of the table to emit. */ @Override public String[] getFieldNames() { if (fieldNames.isPresent()) { return fieldNames.get(); } else { throw new IllegalStateException( "Table sink must be configured to retrieve field names."); } }
3.68
flink_FlinkZooKeeperQuorumPeer_runFlinkZkQuorumPeer
/** * Runs a ZooKeeper {@link QuorumPeer} if further peers are configured or a single {@link * ZooKeeperServer} if no further peers are configured. * * @param zkConfigFile ZooKeeper config file 'zoo.cfg' * @param peerId ID for the 'myid' file */ public static void runFlinkZkQuorumPeer(String zkConfigFile, int pee...
3.68
flink_KafkaEventsGeneratorJob_rpsFromSleep
// Used for backwards compatibility to convert legacy 'sleep' parameter to records per second. private static double rpsFromSleep(int sleep, int parallelism) { return (1000d / sleep) * parallelism; }
3.68
framework_LayoutManager_getMarginTop
/** * Gets the top margin 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 re...
3.68
hadoop_FSDirAppendOp_appendFile
/** * Append to an existing file. * <p> * * The method returns the last block of the file if this is a partial block, * which can still be used for writing more data. The client uses the * returned block locations to form the data pipeline for this block.<br> * The {@link LocatedBlock} will be null if the last b...
3.68