name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
flink_AbstractParameterTool_get
/** * Returns the String value for the given key. If the key does not exist it will return the * given default value. */ public String get(String key, String defaultValue) { addToDefaults(key, defaultValue); String value = get(key); if (value == null) { return defaultValue; } else { r...
3.68
hadoop_SinglePendingCommit_getDate
/** * Timestamp as date; no expectation of parseability. * @return date string */ public String getDate() { return date; }
3.68
rocketmq-connect_WorkerConnector_initialize
/** * initialize connector */ public void initialize() { try { if (!isSourceConnector() && !isSinkConnector()) { throw new ConnectException("Connector implementations must be a subclass of either SourceConnector or SinkConnector"); } log.debug("{} Initializing connector {}", th...
3.68
morf_AbstractSqlDialectTest_expectedHints5
/** * @return The expected SQL when no hint directive is used on the {@link InsertStatement}. */ private String expectedHints5() { return "INSERT INTO " + tableName("Foo") + " SELECT a, b FROM " + tableName("Foo_1"); }
3.68
dubbo_ReferenceCountedResource_retain
/** * Increments the reference count by 1. */ public final ReferenceCountedResource retain() { long oldCount = COUNTER_UPDATER.getAndIncrement(this); if (oldCount <= 0) { COUNTER_UPDATER.getAndDecrement(this); throw new AssertionError("This instance has been destroyed"); } return this;...
3.68
flink_PipelinedSubpartition_getBuffersInBacklogUnsafe
/** Gets the number of non-event buffers in this subpartition. */ @SuppressWarnings("FieldAccessNotGuarded") @Override public int getBuffersInBacklogUnsafe() { if (isBlocked || buffers.isEmpty()) { return 0; } if (flushRequested || isFinished || !checkNotNull(buffers.peekLas...
3.68
framework_SQLContainer_addContainerFilter
/** * {@inheritDoc} */ public void addContainerFilter(Object propertyId, String filterString, boolean ignoreCase, boolean onlyMatchPrefix) { if (propertyId == null || !propertyIds.contains(propertyId)) { return; } /* Generate Filter -object */ String likeStr = onlyMatchPrefix ? filter...
3.68
graphhopper_CustomModelParser_injectStatements
/** * Injects the already parsed expressions (converted to BlockStatement) via Janino's DeepCopier to the provided * CompilationUnit cu (a class file). */ private static Java.CompilationUnit injectStatements(List<Java.BlockStatement> priorityStatements, List<Java....
3.68
flink_WrapJsonAggFunctionArgumentsRule_addProjections
/** * Adds (wrapped) projections for affected arguments of the aggregation. For duplicate * projection fields, we only wrap them once and record the conversion relationship in the map * valueIndicesAfterProjection. * * <p>Note that we cannot override any of the projections as a field may be used multiple times, *...
3.68
flink_ExternalResourceOptions_getAmountConfigOptionForResource
/** Generate the config option key for the amount of external resource with resource_name. */ public static String getAmountConfigOptionForResource(String resourceName) { return keyWithResourceNameAndSuffix(resourceName, EXTERNAL_RESOURCE_AMOUNT_SUFFIX); }
3.68
zxing_CameraManager_getFramingRect
/** * Calculates the framing rect which the UI should draw to show the user where to place the * barcode. This target helps with alignment as well as forces the user to hold the device * far enough away to ensure the image will be in focus. * * @return The rectangle to draw on screen in window coordinates. */ pub...
3.68
dubbo_Configuration_getProperty
/** * Gets a property from the configuration. The default value will return if the configuration doesn't contain * the mapping for the specified key. * * @param key property to retrieve * @param defaultValue default value * @return the value to which this configuration maps the specified key, or default value if ...
3.68
hudi_HoodieAvroUtils_convertValueForAvroLogicalTypes
/** * This method converts values for fields with certain Avro Logical data types that require special handling. * <p> * Logical Date Type is converted to actual Date value instead of Epoch Integer which is how it is * represented/stored in parquet. * <p> * Decimal Data Type is converted to actual decimal value i...
3.68
flink_DataSet_print
/** * Writes a DataSet to the standard output stream (stdout). * * <p>For each element of the DataSet the result of {@link Object#toString()} is written. * * @param sinkIdentifier The string to prefix the output with. * @return The DataSink that writes the DataSet. * @deprecated Use {@link #printOnTaskManager(St...
3.68
hbase_BackupInfo_setIncrTimestampMap
/** * Set the new region server log timestamps after distributed log roll * @param prevTableSetTimestampMap table timestamp map */ public void setIncrTimestampMap(Map<TableName, Map<String, Long>> prevTableSetTimestampMap) { this.incrTimestampMap = prevTableSetTimestampMap; }
3.68
flink_AllWindowedStream_apply
/** * Applies the given window function to each window. The window function is called for each * evaluation of the window for each key individually. The output of the window function is * interpreted as a regular non-windowed stream. * * <p>Arriving data is incrementally aggregated using the given reducer. * * @...
3.68
flink_ZooKeeperUtils_generateZookeeperPath
/** Creates a ZooKeeper path of the form "/a/b/.../z". */ public static String generateZookeeperPath(String... paths) { return Arrays.stream(paths) .map(ZooKeeperUtils::trimSlashes) .filter(s -> !s.isEmpty()) .collect(Collectors.joining("/", "/", "")); }
3.68
rocketmq-connect_TimestampIncrementingQuerier_beginTimestampValue
/** * get begin timestamp from offset topic * * @return */ @Override public Timestamp beginTimestampValue() { return offset.getTimestampOffset(); }
3.68
flink_Plan_getPostPassClassName
/** * Gets the optimizer post-pass class for this job. The post-pass typically creates utility * classes for data types and is specific to a particular data model (record, tuple, Scala, ...) * * @return The name of the class implementing the optimizer post-pass. */ public String getPostPassClassName() { return...
3.68
morf_OracleMetaDataProvider_keyMap
/** * Use to access the metadata for the primary keys in the specified connection. * Lazily initialises the metadata, and only loads it once. * * @return Primary keys metadata. */ private Map<String, List<String>> keyMap() { if (keyMap != null) { return keyMap; } keyMap = new HashMap<>(); expensiveRea...
3.68
morf_XmlDataSetConsumer_buildIndexAttributes
/** * Build the attributes for a database index * * @param index The index * @return The attributes */ private Attributes buildIndexAttributes(Index index) { AttributesImpl indexAttributes = new AttributesImpl(); indexAttributes.addAttribute(XmlDataSetNode.URI, XmlDataSetNode.NAME_ATTRIBUTE, XmlDataSetNode.NA...
3.68
cron-utils_FieldSpecialCharsDefinitionBuilder_withValidRange
/** * Allows to set a range of valid values for field. * * @param startRange - start range value * @param endRange - end range value * @return same FieldSpecialCharsDefinitionBuilder instance */ @Override public FieldSpecialCharsDefinitionBuilder withValidRange(final int startRange, final int endRange) { su...
3.68
dubbo_AdaptiveClassCodeGenerator_generatePackageInfo
/** * generate package info */ private String generatePackageInfo() { return String.format(CODE_PACKAGE, type.getPackage().getName()); }
3.68
flink_FileSystemCommitter_commitPartitions
/** * Commits the partitions with a filter to filter out invalid task attempt files. In speculative * execution mode, there might be some files which do not belong to the finished attempt. * * @param taskAttemptFilter the filter that accepts subtaskIndex and attemptNumber * @throws Exception if partition commitmen...
3.68
hbase_HBaseCommonTestingUtility_setupDataTestDir
/** * Sets up a directory for a test to use. * @return New directory path, if created. */ protected Path setupDataTestDir() { if (this.dataTestDir != null) { LOG.warn("Data test dir already setup in " + dataTestDir.getAbsolutePath()); return null; } Path testPath = getRandomDir(); this.dataTestDir = ...
3.68
hadoop_BufferPool_release
/** * Releases a previously acquired resource. * @param data the {@code BufferData} instance to release. * @throws IllegalArgumentException if data is null. * @throws IllegalArgumentException if data cannot be released due to its state. */ public synchronized void release(BufferData data) { checkNotNull(data, "d...
3.68
hbase_OrderedBytes_unexpectedHeader
/** * Creates the standard exception when the encoded header byte is unexpected for the decoding * context. * @param header value used in error message. */ private static IllegalArgumentException unexpectedHeader(byte header) { throw new IllegalArgumentException( "unexpected value in first byte: 0x" + Long.to...
3.68
framework_VAbsoluteLayout_getWidgetIndex
/* * (non-Javadoc) * * @see * com.google.gwt.user.client.ui.ComplexPanel#getWidgetIndex(com.google. * gwt.user.client.ui.Widget) */ @Override public int getWidgetIndex(Widget child) { for (int i = 0, j = 0; i < super.getWidgetCount(); i++) { Widget w = super.getWidget(i); if (w instanceof Abso...
3.68
hadoop_ConnectionPool_close
/** * Close the connection pool. */ protected synchronized void close() { long timeSinceLastActive = TimeUnit.MILLISECONDS.toSeconds( Time.now() - getLastActiveTime()); LOG.debug("Shutting down connection pool \"{}\" used {} seconds ago", this.connectionPoolId, timeSinceLastActive); for (Connection...
3.68
pulsar_MathUtils_signSafeMod
/** * Compute sign safe mod. * * @param dividend * @param divisor * @return */ public static int signSafeMod(long dividend, int divisor) { int mod = (int) (dividend % divisor); if (mod < 0) { mod += divisor; } return mod; }
3.68
hbase_FutureUtils_wrapFuture
/** * Return a {@link CompletableFuture} which is same with the given {@code future}, but execute all * the callbacks in the given {@code executor}. */ public static <T> CompletableFuture<T> wrapFuture(CompletableFuture<T> future, Executor executor) { CompletableFuture<T> wrappedFuture = new CompletableFuture<>(...
3.68
flink_SortMergeResultPartition_writeLargeRecord
/** * Spills the large record into the target {@link PartitionedFile} as a separate data region. */ private void writeLargeRecord( ByteBuffer record, int targetSubpartition, DataType dataType, boolean isBroadcast) throws IOException { // a large record will be spilled to a separated data region ...
3.68
morf_AbstractSqlDialectTest_verifyBooleanPrepareStatementParameter
/** * Tests the logic used for transferring a boolean {@link Record} value to a * {@link PreparedStatement}. For overriding in specific DB tests * * @throws SQLException when a database access error occurs */ protected void verifyBooleanPrepareStatementParameter() throws SQLException { final SqlParameter boolea...
3.68
flink_RestfulGateway_reportJobClientHeartbeat
/** The client reports the heartbeat to the dispatcher for aliveness. */ default CompletableFuture<Void> reportJobClientHeartbeat( JobID jobId, long expiredTimestamp, Time timeout) { return FutureUtils.completedVoidFuture(); }
3.68
morf_DataValueLookupMetadata_hashCode
/** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { int h = hash; if (h != 0) { return h; } final int prime = 31; h = 1; h = prime * h + (keys == null ? 0 : keys.hashCode()); hash = h; return h; }
3.68
hudi_ExpressionPredicates_bindValueLiterals
/** * Binds value literals to create an IN predicate. * * @param valueLiterals The value literals to negate. * @return An IN predicate. */ public ColumnPredicate bindValueLiterals(List<ValueLiteralExpression> valueLiterals) { this.literals = valueLiterals.stream().map(valueLiteral -> { Object literalObject =...
3.68
framework_AbstractRemoteDataSource_fillCacheFromInvalidatedRows
/** * Go through items invalidated by {@link #insertRowData(int, int)}. If the * server has pre-emptively sent added row data immediately after informing * of row addition, the invalid cache can be restored to proper index range. * * @param maxCacheRange * the maximum amount of rows that can cached */...
3.68
framework_BasicEvent_removeEventChangeListener
/* * (non-Javadoc) * * @see * com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventChangeNotifier * #removeListener * (com.vaadin.addon.calendar.ui.CalendarComponentEvents.EventChangeListener * ) */ @Override public void removeEventChangeListener(EventChangeListener listener) { listeners.remove(listene...
3.68
hudi_StreamerUtil_getTableConfig
/** * Returns the table config or empty if the table does not exist. */ public static Option<HoodieTableConfig> getTableConfig(String basePath, org.apache.hadoop.conf.Configuration hadoopConf) { FileSystem fs = FSUtils.getFs(basePath, hadoopConf); Path metaPath = new Path(basePath, HoodieTableMetaClient.METAFOLDE...
3.68
hadoop_FileDeletionTask_getSubDir
/** * Get the subdirectory to delete. * * @return the subDir for the FileDeletionTask. */ public Path getSubDir() { return this.subDir; }
3.68
hudi_FileSystemViewManager_createViewManager
/** * Main Factory method for building file-system views. * */ public static FileSystemViewManager createViewManager(final HoodieEngineContext context, final HoodieMetadataConfig metadataConfig, final FileSyst...
3.68
hbase_HRegion_throwOnInterrupt
/** * Throw the correct exception upon interrupt * @param t cause */ // Package scope for tests IOException throwOnInterrupt(Throwable t) { if (this.closing.get()) { return (NotServingRegionException) new NotServingRegionException( getRegionInfo().getRegionNameAsString() + " is closing").initCause(t); ...
3.68
flink_LeaderRetriever_getLeaderNow
/** * Returns the current leader information if available. Otherwise it returns an empty optional. * * @return The current leader information if available. Otherwise it returns an empty optional. * @throws Exception if the leader future has been completed with an exception */ public Optional<Tuple2<String, UUID>> ...
3.68
hadoop_FindOptions_setConfiguration
/** * Set the {@link Configuration} * * @param configuration {@link Configuration} */ public void setConfiguration(Configuration configuration) { this.configuration = configuration; }
3.68
hadoop_CustomResourceMetrics_initAndGetCustomResources
/** * Get a map of all custom resource metric. * @return map of custom resource */ public Map<String, Long> initAndGetCustomResources() { Map<String, Long> customResources = new HashMap<String, Long>(); ResourceInformation[] resources = ResourceUtils.getResourceTypesArray(); for (int i = 2; i < resources.leng...
3.68
hmily_CuratorZookeeperClient_get
/** * Get string. * * @param path the path * @return the string */ public String get(final String path) { CuratorCache cache = findTreeCache(path); if (null == cache) { return getDirectly(path); } Optional<ChildData> resultInCache = cache.get(path); if (resultInCache.isPresent()) { ...
3.68
framework_Table_isSortDisabled
/** * Is sorting disabled altogether. * * True if no sortable columns are given even in the case where data source * would support this. * * @return True if sorting is disabled. * @deprecated As of 7.0, use {@link #isSortEnabled()} instead */ @Deprecated public boolean isSortDisabled() { return !isSortEnabl...
3.68
hbase_StorageClusterStatusModel_setCurrentCompactedKVs
/** * @param currentCompactedKVs The completed count of key values in currently running * compaction */ public void setCurrentCompactedKVs(long currentCompactedKVs) { this.currentCompactedKVs = currentCompactedKVs; }
3.68
pulsar_OffloadIndexBlockV2Impl_toStream
/** * Get the content of the index block as InputStream. * Read out in format: * | index_magic_header | index_block_len | data_object_len | data_header_len | * | index_entry_count | segment_metadata_len | segment metadata | index entries... | */ @Override public IndexInputStream toStream() throws IOException ...
3.68
framework_RadioButtonGroup_isHtmlContentAllowed
/** * Checks whether captions are interpreted as html or plain text. * * @return true if the captions are used as html, false if used as plain * text * @see #setHtmlContentAllowed(boolean) */ public boolean isHtmlContentAllowed() { return getState(false).htmlContentAllowed; }
3.68
flink_FileInputFormat_getFilePath
/** * @return The path of the file to read. * @deprecated Please use getFilePaths() instead. */ @Deprecated public Path getFilePath() { if (supportsMultiPaths()) { if (this.filePaths == null || this.filePaths.length == 0) { return null; } else if (this.filePaths.length == 1) { ...
3.68
hadoop_AHSWebServices_getContainerLogsInfo
// TODO: YARN-6080: Create WebServiceUtils to have common functions used in // RMWebService, NMWebService and AHSWebService. /** * Returns log file's name as well as current file size for a container. * * @param req * HttpServletRequest * @param res * HttpServletResponse * @param containerIdStr * ...
3.68
morf_AbstractSqlDialectTest_expectedCreateViewOverUnionSelectStatements
/** * @return The expected SQL statements for creating the test database view over a union select. */ protected List<String> expectedCreateViewOverUnionSelectStatements() { return Arrays.asList("CREATE VIEW " + tableName("TestView") + " AS (SELECT stringField FROM " + tableName(TEST_TABLE) + " WHERE (stringField = ...
3.68
hudi_HoodieCDCUtils_cdcRecord
/** * Build the cdc record when `hoodie.table.cdc.supplemental.logging.mode` is {@link HoodieCDCSupplementalLoggingMode#OP_KEY_ONLY}. */ public static GenericData.Record cdcRecord(Schema cdcSchema, String op, String recordKey) { GenericData.Record record = new GenericData.Record(cdcSchema); record.put(CDC_OPERATI...
3.68
hbase_Hash_getHashType
/** * This utility method converts the name of the configured hash type to a symbolic constant. * @param conf configuration * @return one of the predefined constants */ public static int getHashType(Configuration conf) { String name = conf.get("hbase.hash.type", "murmur"); return parseHashType(name); }
3.68
querydsl_Coalesce_as
/** * Create an alias for the expression * * @return this as alias */ public DslExpression<T> as(String alias) { return as(ExpressionUtils.path(getType(), alias)); }
3.68
flink_AvroParquetRecordFormat_isSplittable
/** Current version does not support splitting. */ @Override public boolean isSplittable() { return false; }
3.68
druid_WallConfig_isDescribeAllow
/** * allow mysql describe statement * * @return * @since 0.2.10 */ public boolean isDescribeAllow() { return describeAllow; }
3.68
dubbo_MessageFormatter_format
/** * Performs a two argument substitution for the 'messagePattern' passed as * parameter. * <p/> * For example, * <p/> * <pre> * MessageFormatter.format(&quot;Hi {}. My name is {}.&quot;, &quot;Alice&quot;, &quot;Bob&quot;); * </pre> * <p/> * will return the string "Hi Alice. My name is Bob.". * * @param m...
3.68
hbase_RequestConverter_buildGetTableNamesRequest
/** * Creates a protocol buffer GetTableNamesRequest * @param pattern The compiled regular expression to match against * @param includeSysTables False to match only against userspace tables * @return a GetTableNamesRequest */ public static GetTableNamesRequest buildGetTableNamesRequest(final Pattern patte...
3.68
hbase_Permission_newBuilder
/** * Build a table permission * @param tableName the specific table name * @return table permission builder */ public static Builder newBuilder(TableName tableName) { return new Builder(tableName); }
3.68
hbase_HRegion_isFlushSize
/* * @return True if size is over the flush threshold */ private boolean isFlushSize(MemStoreSize size) { return size.getHeapSize() + size.getOffHeapSize() > getMemStoreFlushSize(); }
3.68
framework_ComponentLocator_getElementByPathStartingAt
/** * Locates an element using a String locator (path) which identifies a DOM * element. The path starts from the specified root element. * * @see #getElementByPath(String) * * @since 7.2 * * @param path * The path of the element to be found * @param root * The root element where the pa...
3.68
pulsar_FunctionMetaDataManager_listFunctions
/** * List all the functions in a namespace. * @param tenant the tenant the namespace belongs to * @param namespace the namespace * @return a list of function names */ public synchronized Collection<FunctionMetaData> listFunctions(String tenant, String namespace) { List<FunctionMetaData> ret = new LinkedList<>...
3.68
morf_SqlDialect_getExistingMaxAutoNumberValue
/** * Builds SQL to get the maximum value of the specified column on the * specified {@code dataTable}. * * @param dataTable the table to query over. * @param fieldName Name of the field to query over for the max value. * @return SQL getting the maximum value from the {@code dataTable}. */ protected String getEx...
3.68
pulsar_AuthenticationMetrics_authenticateFailure
/** * Log authenticate failure event to the authentication metrics. * @param providerName The short class name of the provider * @param authMethod Authentication method name. * @param errorCode Error code. */ public static void authenticateFailure(String providerName, String authMethod, Enum<?> errorCode) { au...
3.68
framework_DefaultDeploymentConfiguration_checkProductionMode
/** * Log a warning if Vaadin is not running in production mode. */ private void checkProductionMode() { productionMode = getApplicationOrSystemProperty( Constants.SERVLET_PARAMETER_PRODUCTION_MODE, "false") .equals("true"); if (!productionMode) { getLogger().warning(Co...
3.68
flink_SlideWithSizeAndSlideOnTime_as
/** * Assigns an alias for this window that the following {@code groupBy()} and {@code select()} * clause can refer to. {@code select()} statement can access window properties such as window * start or end time. * * @param alias alias for this window * @return this window */ public SlideWithSizeAndSlideOnTimeWit...
3.68
framework_AbstractTextFieldElement_setValue
/** * Set value of the field element. * * @param chars * new value of the field */ public void setValue(CharSequence chars) throws ReadOnlyException { if (isReadOnly()) { throw new ReadOnlyException(); } clearElementClientSide(this); focus(); sendKeys(chars); sendKeys(Key...
3.68
flink_Tuple0_equals
/** * Deep equality for tuples by calling equals() on the tuple members. * * @param o the object checked for equality * @return true if this is equal to o. */ @Override public boolean equals(Object o) { return this == o || o instanceof Tuple0; }
3.68
flink_CanalJsonFormatFactory_validateDecodingFormatOptions
/** Validator for canal decoding format. */ private static void validateDecodingFormatOptions(ReadableConfig tableOptions) { JsonFormatOptionsUtil.validateDecodingFormatOptions(tableOptions); }
3.68
dubbo_CodecSupport_isHeartBeat
/** * Check if payload is null object serialize result byte[] of serialization * * @param payload * @param proto * @return */ public static boolean isHeartBeat(byte[] payload, byte proto) { return Arrays.equals(payload, getNullBytesOf(getSerializationById(proto))); }
3.68
querydsl_SQLExpressions_countDistinct
/** * Start a window function expression * * @param expr expression * @return count(distinct expr) */ public static WindowOver<Long> countDistinct(Expression<?> expr) { return new WindowOver<Long>(Long.class, Ops.AggOps.COUNT_DISTINCT_AGG, expr); }
3.68
flink_RestServerEndpointConfiguration_getResponseHeaders
/** Response headers that should be added to every HTTP response. */ public Map<String, String> getResponseHeaders() { return responseHeaders; }
3.68
flink_CliFrontendParser_printCustomCliOptions
/** * Prints custom cli options. * * @param formatter The formatter to use for printing * @param runOptions True if the run options should be printed, False to print only general * options */ private static void printCustomCliOptions( Collection<CustomCommandLine> customCommandLines, HelpForma...
3.68
hadoop_S3ALocatedFileStatus_getETag
/** * @return the S3 object eTag when available, else null. * @deprecated use {@link EtagSource#getEtag()} for * public access. */ @Deprecated public String getETag() { return getEtag(); }
3.68
morf_RenameIndex_reverse
/** * {@inheritDoc} * * @see org.alfasoftware.morf.upgrade.SchemaChange#reverse(org.alfasoftware.morf.metadata.Schema) */ @Override public Schema reverse(Schema schema) { return applyChange(schema, toIndexName, fromIndexName); }
3.68
hadoop_MultiStateTransitionListener_addListener
/** * Add a listener to the list of listeners. * @param listener A listener. */ public void addListener(StateTransitionListener<OPERAND, EVENT, STATE> listener) { listeners.add(listener); }
3.68
framework_Escalator_sortDomElements
/** * Sorts the rows in the DOM to correspond to the visual order. * * @see #visualRowOrder */ private void sortDomElements() { final String profilingName = "Escalator.BodyRowContainer.sortDomElements"; Profiler.enter(profilingName); /* * Focus is lost from an element if that DOM element is (or an...
3.68
hudi_HoodieExampleDataGenerator_generateUniqueUpdates
/** * Generates new updates, one for each of the keys above * list * * @param commitTime Commit Timestamp * @return list of hoodie record updates */ public List<HoodieRecord<T>> generateUniqueUpdates(String commitTime) { List<HoodieRecord<T>> updates = new ArrayList<>(); for (int i = 0; i < numExistingKeys; i...
3.68
framework_Embedded_setType
/** * Sets the object type. * <p> * This can be one of the following: * <ul> * <li>{@link #TYPE_OBJECT} <i>(This is the default)</i> * <li>{@link #TYPE_IMAGE} <i>(Deprecated)</i> * <li>{@link #TYPE_BROWSER} <i>(Deprecated)</i> * </ul> * </p> * * @param type * the type to set. */ public void setT...
3.68
hudi_AbstractStreamWriteFunction_reloadWriteMetaState
/** * Reload the write metadata state as the current checkpoint. */ private void reloadWriteMetaState() throws Exception { this.writeMetadataState.clear(); WriteMetadataEvent event = WriteMetadataEvent.builder() .taskID(taskID) .instantTime(currentInstant) .writeStatus(new ArrayList<>(writeStatu...
3.68
hadoop_PrintJarMainClass_main
/** * @param args args. */ public static void main(String[] args) { try (JarFile jar_file = new JarFile(args[0])) { Manifest manifest = jar_file.getManifest(); if (manifest != null) { String value = manifest.getMainAttributes().getValue("Main-Class"); if (value != null) { System.out.prin...
3.68
hadoop_Chain_getCurrentValue
/** * Get the current value. * * @return the value object that was read into * @throws IOException * @throws InterruptedException */ public VALUEIN getCurrentValue() throws IOException, InterruptedException { return this.value; }
3.68
framework_VCalendarPanel_setTimeChangeListener
/** * The time change listener is triggered when the user changes the time. * * @param listener */ public void setTimeChangeListener(TimeChangeListener listener) { timeChangeListener = listener; }
3.68
hbase_RegionHDFSBlockLocationFinder_createCache
/** * Create a cache for region to list of servers * @return A new Cache. */ private LoadingCache<RegionInfo, HDFSBlocksDistribution> createCache() { return CacheBuilder.newBuilder().expireAfterWrite(CACHE_TIME, TimeUnit.MILLISECONDS) .build(loader); }
3.68
flink_TableChange_getKey
/** Returns the Option key to reset. */ public String getKey() { return key; }
3.68
hudi_AbstractTableFileSystemView_fetchMergedFileSlice
/** * If the file-slice is because of pending compaction instant, this method merges the file-slice with the one before * the compaction instant time. * * @param fileGroup File Group for which the file slice belongs to * @param fileSlice File Slice which needs to be merged */ private FileSlice fetchMergedFileSlic...
3.68
flink_TypeExtractor_getBinaryOperatorReturnType
/** * Returns the binary operator's return type. * * <p>This method can extract a type in 4 different ways: * * <p>1. By using the generics of the base class like MyFunction<X, Y, Z, IN, OUT>. This is what * outputTypeArgumentIndex (in this example "4") is good for. * * <p>2. By using input type inference SubMy...
3.68
hadoop_ChainMapper_addMapper
/** * Adds a {@link Mapper} class to the chain mapper. * * <p> * The key and values are passed from one element of the chain to the next, by * value. For the added Mapper the configuration given for it, * <code>mapperConf</code>, have precedence over the job's Configuration. This * precedence is in effect when ...
3.68
pulsar_MultiTopicsConsumerImpl_getPartitionsOfTheTopicMap
// get all partitions that in the topics map int getPartitionsOfTheTopicMap() { return partitionedTopics.values().stream().mapToInt(Integer::intValue).sum(); }
3.68
morf_Join_getCriterion
/** * Get the criteria used in the join. * * @return the criteria */ public Criterion getCriterion() { return criterion; }
3.68
dubbo_InternalThreadLocal_size
/** * Returns the number of thread local variables bound to the current thread. */ public static int size() { InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.getIfSet(); if (threadLocalMap == null) { return 0; } else { return threadLocalMap.size(); } }
3.68
flink_BinarySegmentUtils_bitUnSet
/** * unset bit from segments. * * @param segments target segments. * @param baseOffset bits base offset. * @param index bit index from base offset. */ public static void bitUnSet(MemorySegment[] segments, int baseOffset, int index) { if (segments.length == 1) { MemorySegment segment = segments[0]; ...
3.68
framework_SuperTextAreaConnector_getState
// @DelegateToWidget will not work with overridden state @Override public SuperTextAreaState getState() { return (SuperTextAreaState) super.getState(); }
3.68
hbase_ConnectionUtils_getStubKey
/** * Get a unique key for the rpc stub to the given server. */ static String getStubKey(String serviceName, ServerName serverName) { return String.format("%s@%s", serviceName, serverName); }
3.68
morf_AbstractSqlDialectTest_testCastToDecimal
/** * Tests the output of a cast to a decimal. */ @Test public void testCastToDecimal() { String result = testDialect.getSqlFrom(new Cast(new FieldReference("value"), DataType.DECIMAL, 10, 2)); assertEquals(expectedDecimalCast(), result); }
3.68
framework_Navigator_removeView
/** * Removes a view from navigator. * <p> * This method only applies to views registered using * {@link #addView(String, View)} or {@link #addView(String, Class)}. * * @param viewName * name of the view to remove */ public void removeView(String viewName) { Iterator<ViewProvider> it = providers....
3.68
framework_DefaultDeploymentConfiguration_isSyncIdCheckEnabled
/** * {@inheritDoc} * <p> * The default value is <code>true</code>. */ @Override public boolean isSyncIdCheckEnabled() { return syncIdCheck; }
3.68
hbase_RegionLocator_getStartKeys
/** * Gets the starting row key for every region in the currently open table. * <p> * This is mainly useful for the MapReduce integration. * @return Array of region starting row keys * @throws IOException if a remote or network exception occurs */ default byte[][] getStartKeys() throws IOException { return getS...
3.68