name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_ByteBufferUtils_toLong
/** * Reads a long value at the given buffer's offset. * @param buffer input byte buffer to read * @param offset input offset where Long is * @return long value at offset */ public static long toLong(ByteBuffer buffer, int offset) { return ConverterHolder.BEST_CONVERTER.toLong(buffer, offset); }
3.68
morf_Oracle_extractJdbcUrl
/** * * @see org.alfasoftware.morf.jdbc.AbstractDatabaseType#extractJdbcUrl(java.lang.String) */ @Override public Optional<JdbcUrlElements> extractJdbcUrl(String jdbcUrl) { Stack<String> splitURL = splitJdbcUrl(jdbcUrl); String scheme = splitURL.pop(); if (!scheme.equalsIgnoreCase("oracle")) { return Opt...
3.68
framework_AbstractRemoteDataSource_getCachedRange
/** * Gets the current range of cached rows. * * @return the range of currently cached rows */ public Range getCachedRange() { return cached; }
3.68
pulsar_ResourceGroupService_calculateQuotaForAllResourceGroups
// Periodically calculate the updated quota for all RGs in the background, // from the reports received from other brokers. // [Visibility for unit testing.] protected void calculateQuotaForAllResourceGroups() { // Calculate the quota for the next window for this RG, based on the observed usage. final Summary.T...
3.68
pulsar_ClusterDataImpl_checkPropertiesIfPresent
/** * Check cluster data properties by rule, if some property is illegal, it will throw * {@link IllegalArgumentException}. * * @throws IllegalArgumentException exist illegal property. */ public void checkPropertiesIfPresent() throws IllegalArgumentException { URIPreconditions.checkURIIfPresent(getServiceUrl()...
3.68
hbase_MetricsSource_incrLogEditsFiltered
/** The number of log edits filtered out. */ public void incrLogEditsFiltered() { incrLogEditsFiltered(1); }
3.68
hbase_MasterCoprocessorHost_postTruncateRegion
/** * Invoked after calling the truncate region procedure * @param regionInfo region being truncated */ public void postTruncateRegion(RegionInfo regionInfo) throws IOException { execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() { @Override public void call(MasterObserver ob...
3.68
pulsar_ResourceUnitRanking_getPreAllocatedBundles
/** * Get the pre-allocated bundles. */ public Set<String> getPreAllocatedBundles() { return this.preAllocatedBundles; }
3.68
framework_TreeData_getChildren
/** * Get the immediate child items for the given item. * * @param item * the item for which to retrieve child items for, null to * retrieve all root items * @return an unmodifiable list of child items for the given item * * @throws IllegalArgumentException * if the item does ...
3.68
hbase_MetricsHeapMemoryManager_increaseTunerDoNothingCounter
/** * Increase the counter for tuner neither expanding memstore global size limit nor expanding * blockcache max size. */ public void increaseTunerDoNothingCounter() { source.increaseTunerDoNothingCounter(); }
3.68
AreaShop_GeneralRegion_setDeleted
/** * Indicate that this region has been deleted. */ public void setDeleted() { deleted = true; }
3.68
hudi_OptionsResolver_isInsertOperation
/** * Returns whether the table operation is 'insert'. */ public static boolean isInsertOperation(Configuration conf) { WriteOperationType operationType = WriteOperationType.fromValue(conf.getString(FlinkOptions.OPERATION)); return operationType == WriteOperationType.INSERT; }
3.68
framework_FileTypeResolver_getMIMETypeToIconMapping
/** * Gets the internal mime-type to icon mapping. * * @return unmodifiable map containing the current mime-type to icon mapping */ public static Map<String, Resource> getMIMETypeToIconMapping() { return Collections.unmodifiableMap(MIME_TO_ICON_MAP); }
3.68
framework_VFlash_setCodetype
/** * This attribute specifies the content type of data expected when * downloading the object specified by classid. This attribute is optional * but recommended when classid is specified since it allows the user agent * to avoid loading information for unsupported content types. The default * value is the value o...
3.68
framework_AbstractComponent_getDescription
/* * (non-Javadoc) * * @see com.vaadin.ui.Component#getDescription() */ @Override public String getDescription() { return getState(false).description; }
3.68
framework_GeneratedPropertyContainer_equals
/** * Tests if the given object is the same as the this object. Two Items * from the same container with the same ID are equal. * * @param obj * an object to compare with this object * @return <code>true</code> if the given object is the same as this * object, <code>false</code> if not */ @Ov...
3.68
framework_VTabsheetBase_setTabCaptionsAsHtml
/** * Sets whether the caption is rendered as HTML. * <p> * The default is false, i.e. render tab captions as plain text * <p> * This value is delegated from the TabsheetState. * * @since 7.4 * @param tabCaptionsAsHtml * {@code true} if the captions are rendered as HTML, * {@code false} ...
3.68
pulsar_ProducerStats_getPartitionStats
/** * @return stats for each partition if topic is partitioned topic */ default Map<String, ProducerStats> getPartitionStats() { return Collections.emptyMap(); }
3.68
hadoop_IOStatisticsBinding_aggregateMaximums
/** * Aggregate two maximum values. * @param l left * @param r right * @return the new minimum. */ public static Long aggregateMaximums(Long l, Long r) { if (l == MIN_UNSET_VALUE) { return r; } else if (r == MIN_UNSET_VALUE) { return l; } else { return Math.max(l, r); } }
3.68
flink_HsSelectiveSpillingStrategy_decideActionWithGlobalInfo
// Score the buffer of each subpartition and decide the spill and release action. The lower the // score, the more likely the buffer will be consumed in the next time, and should be kept in // memory as much as possible. Select all buffers that need to be spilled according to the score // from high to low. @Override pu...
3.68
hibernate-validator_ValidationXmlTestHelper_runWithCustomValidationXml
/** * Executes the given runnable, using the specified file as replacement for * {@code META-INF/validation.xml}. * * @param validationXmlName The file to be used as validation.xml file. * @param runnable The runnable to execute. */ public void runWithCustomValidationXml(final String validationXmlName, Runnable r...
3.68
hadoop_HsLogsPage_content
/** * The content of this page is the JobBlock * @return HsJobBlock.class */ @Override protected Class<? extends SubView> content() { return AggregatedLogsBlock.class; }
3.68
hbase_HBaseTestingUtility_enableShortCircuit
/** * Enable the short circuit read, unless configured differently. Set both HBase and HDFS settings, * including skipping the hdfs checksum checks. */ private void enableShortCircuit() { if (isReadShortCircuitOn()) { String curUser = System.getProperty("user.name"); LOG.info("read short circuit is ON for ...
3.68
flink_AvroSchemaConverter_convertToDataType
/** * Converts an Avro schema string into a nested row structure with deterministic field order and * data types that are compatible with Flink's Table & SQL API. * * @param avroSchemaString Avro schema definition string * @return data type matching the schema */ public static DataType convertToDataType(String av...
3.68
morf_WhenCondition_getValue
/** * @return the value */ public AliasedField getValue() { return value; }
3.68
hbase_BufferChain_getBytes
/** * Expensive. Makes a new buffer to hold a copy of what is in contained ByteBuffers. This call * drains this instance; it cannot be used subsequent to the call. * @return A new byte buffer with the content of all contained ByteBuffers. */ byte[] getBytes() { if (!hasRemaining()) throw new IllegalAccessError();...
3.68
flink_MapView_setMap
/** Replaces the entire view's content with the content of the given {@link Map}. */ public void setMap(Map<K, V> map) { this.map = map; }
3.68
framework_ContainerOrderedWrapper_size
/* * Gets the number of Items in the Container. Don't add a JavaDoc comment * here, we use the default documentation from implemented interface. */ @Override public int size() { int newSize = container.size(); assert newSize >= 0; if (lastKnownSize != -1 && newSize != lastKnownSize && !(conta...
3.68
graphhopper_VectorTile_addGeometry
/** * <pre> * Contains a stream of commands and parameters (vertices). * A detailed description on geometry encoding is located in * section 4.3 of the specification. * </pre> * * <code>repeated uint32 geometry = 4 [packed = true];</code> */ public Builder addGeometry(int value) { ensureGeometryIsMutable(); ...
3.68
hadoop_ApplicationFinishEvent_getDiagnostic
/** * Why the app was aborted * @return diagnostic message */ public String getDiagnostic() { return diagnostic; }
3.68
hbase_StorageClusterStatusModel_getName
/** Returns the region server's name */ @XmlAttribute public String getName() { return name; }
3.68
dubbo_DubboShutdownHook_register
/** * Register the ShutdownHook */ public void register() { if (!ignoreListenShutdownHook && registered.compareAndSet(false, true)) { try { Runtime.getRuntime().addShutdownHook(this); } catch (IllegalStateException e) { logger.warn(CONFIG_FAILED_SHUTDOWN_HOOK, "", "", "regi...
3.68
open-banking-gateway_RequestScopedProvider_registerForFintechSession
/** * Registers scoped services for the FinTech request. * @param fintech FinTech to provide services for. * @param profile ASPSP profile (i.e. FinTS or Xs2a) * @param session Owning session for current scoped services * @param bankProtocolId Bank protocol id to scope the services more precisely * @param encrypti...
3.68
framework_VaadinSession_getLocale
/** * Gets the default locale for this session. * * By default this is the preferred locale of the user using the session. In * most cases it is read from the browser defaults. * * @return the locale of this session. */ public Locale getLocale() { assert hasLock(); if (locale != null) { return lo...
3.68
graphhopper_WayToEdgeConverter_convertForViaNode
/** * Finds the edge IDs associated with the given OSM ways that are adjacent to the given via-node. * For each way there can be multiple edge IDs and there should be exactly one that is adjacent to the via-node * for each way. Otherwise we throw {@link OSMRestrictionException} */ public NodeResult convertForViaNod...
3.68
hadoop_ReencryptionHandler_run
/** * Main loop. It takes at most 1 zone per scan, and executes until the zone * is completed. * {@link #reencryptEncryptionZone(long)}. */ @Override public void run() { LOG.info("Starting up re-encrypt thread with interval={} millisecond.", interval); while (true) { try { synchronized (this) { ...
3.68
framework_Calendar_fireWeekClick
/** * Fires event when a week was clicked in the calendar. * * @param week * The week that was clicked * @param year * The year of the week */ protected void fireWeekClick(int week, int year) { fireEvent(new WeekClick(this, week, year)); }
3.68
flink_LogicalTypeChecks_hasWellDefinedString
/** * Checks whether the given {@link LogicalType} has a well-defined string representation when * calling {@link Object#toString()} on the internal data structure. The string representation * would be similar in SQL or in a programming language. * * <p>Note: This method might not be necessary anymore, once we hav...
3.68
flink_RocksDBResourceContainer_getDbOptions
/** Gets the RocksDB {@link DBOptions} to be used for RocksDB instances. */ public DBOptions getDbOptions() { // initial options from common profile DBOptions opt = createBaseCommonDBOptions(); handlesToClose.add(opt); // load configurable options on top of pre-defined profile setDBOptionsFromConfi...
3.68
framework_RadioButtonGroupElement_clear
/** * Clear operation is not supported for Option Group. This operation has no * effect on Option Group element. */ @Override public void clear() { super.clear(); }
3.68
hbase_MiniZooKeeperCluster_getAddress
/** Returns Address for this cluster instance. */ public Address getAddress() { return Address.fromParts(HOST, getClientPort()); }
3.68
querydsl_Expressions_dateTimeOperation
/** * Create a new Operation expression * * @param type type of expression * @param operator operator * @param args operation arguments * @return operation expression */ public static <T extends Comparable<?>> DateTimeOperation<T> dateTimeOperation(Class<? extends T> type, Operator operator, Expression<?...
3.68
hbase_ZNodePaths_isMetaZNodePrefix
/** Returns True if meta znode. */ public boolean isMetaZNodePrefix(String znode) { return znode != null && znode.startsWith(this.metaZNodePrefix); }
3.68
querydsl_MathExpressions_cos
/** * Create a {@code cos(num)} expression * * <p>Returns the cosine of an angle of num radians.</p> * * @param num numeric expression * @return cos(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> cos(Expression<A> num) { return Expressions.numberOperation(Double.class, Ops....
3.68
hbase_TableDescriptorBuilder_getColumnFamily
/** * Returns the ColumnFamilyDescriptor for a specific column family with name as specified by the * parameter column. * @param column Column family name * @return Column descriptor for the passed family name or the family on passed in column. */ @Override public ColumnFamilyDescriptor getColumnFamily(final byte[...
3.68
framework_VFilterSelect_hasNextPage
/** * Does the Select have more pages? * * @return true if a next page exists, else false if the current page is the * last page */ public boolean hasNextPage() { return pageLength > 0 && totalMatches > (currentPage + 1) * pageLength; }
3.68
hudi_HoodieLogBlock_isCompactedLogBlock
/** * Compacted blocks are created using log compaction which basically merges the consecutive blocks together and create * huge block with all the changes. */ public boolean isCompactedLogBlock() { return logBlockHeader.containsKey(HeaderMetadataType.COMPACTED_BLOCK_TIMES); }
3.68
hadoop_NativeTaskOutputFiles_getInputFile
/** * Return a local reduce input file created earlier * * @param mapId a map task id */ public Path getInputFile(int mapId) throws IOException { return lDirAlloc.getLocalPathToRead( String.format(REDUCE_INPUT_FILE_FORMAT_STRING, TASKTRACKER_OUTPUT, Integer.valueOf(mapId)), conf); }
3.68
hbase_BalancerClusterState_serverHasTooFewRegions
/** * Returns true iff a given server has less regions than the balanced amount */ public boolean serverHasTooFewRegions(int server) { int minLoad = this.numRegions / numServers; int numRegions = getNumRegions(server); return numRegions < minLoad; }
3.68
hadoop_FederationApplicationHomeSubClusterStoreInputValidator_validate
/** * Quick validation on the input to check some obvious fail conditions (fail * fast). Check if the provided {@link DeleteApplicationHomeSubClusterRequest} * for deleting an application is valid or not. * * @param request the {@link DeleteApplicationHomeSubClusterRequest} to * validate against * @thro...
3.68
flink_TaskStatsRequestCoordinator_handleSuccessfulResponse
/** * Handles the successfully returned tasks stats response by collecting the corresponding * subtask samples. * * @param requestId ID of the request. * @param executionIds ID of the sampled task. * @param result Result of stats request returned by an individual task. * @throws IllegalStateException If unknown ...
3.68
hbase_ZKMainServer_hasServer
/** * @param args the arguments to check * @return True if argument strings have a '-server' in them. */ private static boolean hasServer(final String[] args) { return args.length > 0 && args[0].equals(SERVER_ARG); }
3.68
hadoop_HdfsFileStatus_isdir
/** * Set the isDir flag for the entity (default = false). * @param isdir True if the referent is a directory. * @return This Builder instance */ public Builder isdir(boolean isdir) { this.isdir = isdir; return this; }
3.68
hbase_SnapshotInfo_addStoreFile
/** * Add the specified store file to the stats * @param region region encoded Name * @param family family name * @param storeFile store file name * @param filesMap store files map for all snapshots, it may be null * @return the store file information */ FileInfo addStoreFile(final RegionInfo region, fina...
3.68
flink_AbstractPythonScalarFunctionOperator_createUserDefinedFunctionsProto
/** Gets the proto representation of the Python user-defined functions to be executed. */ @Override public FlinkFnApi.UserDefinedFunctions createUserDefinedFunctionsProto() { return ProtoUtils.createUserDefinedFunctionsProto( getRuntimeContext(), scalarFunctions, config.get(PYTHO...
3.68
framework_Window_getWindow
/** * Get the window form which this event originated. * * @return the window */ public Window getWindow() { return (Window) getSource(); }
3.68
flink_AbstractPagedInputView_seekInput
/** * Sets the internal state of the view such that the next bytes will be read from the given * memory segment, starting at the given position. The memory segment will provide bytes up to * the given limit position. * * @param segment The segment to read the next bytes from. * @param positionInSegment The positi...
3.68
open-banking-gateway_Xs2aConsentInfo_isStartConsentAuthorizationWithPin
/** * If ASPSP needs startConsentAuthorization with User Password. */ public boolean isStartConsentAuthorizationWithPin(Xs2aContext ctx) { return ctx.aspspProfile().isXs2aStartConsentAuthorizationWithPin(); }
3.68
hmily_HmilySqlParserEngineFactory_newInstance
/** * New instance hmily sql parser engine. * * @return the hmily sql parser engine */ public static HmilySqlParserEngine newInstance() { if (hmilySqlParserEngine == null) { synchronized (HmilySqlParserEngineFactory.class) { if (hmilySqlParserEngine == null) { HmilyConfig con...
3.68
hudi_CompactionUtils_getCompactionPlan
/** * Util method to fetch both compaction and log compaction plan from requestedInstant. */ public static HoodieCompactionPlan getCompactionPlan(HoodieTableMetaClient metaClient, Option<byte[]> planContent) { CompactionPlanMigrator migrator = new CompactionPlanMigrator(metaClient); try { HoodieCompactionPlan...
3.68
hbase_AssignmentVerificationReport_fillUpDispersion
/** * Use this to project the dispersion scores */ public void fillUpDispersion(TableName tableName, SnapshotOfRegionAssignmentFromMeta snapshot, FavoredNodesPlan newPlan) { // Set the table name this.tableName = tableName; // Get all the regions for this table List<RegionInfo> regionInfoList = snapshot.get...
3.68
framework_Heartbeat_schedule
/** * Updates the schedule of the heartbeat to match the set interval. A * negative interval disables the heartbeat. */ public void schedule() { if (interval > 0) { getLogger() .fine("Scheduling heartbeat in " + interval + " seconds"); timer.schedule(interval * 1000); } else {...
3.68
dubbo_MemorySafeLinkedBlockingQueue_setRejector
/** * set the rejector. * * @param rejector the rejector */ public void setRejector(final Rejector<E> rejector) { this.rejector = rejector; }
3.68
hadoop_ZookeeperUtils_buildQuorum
/** * Build a quorum list, injecting a ":defaultPort" ref if needed on * any entry without one * @param hostAndPorts * @param defaultPort * @return */ public static String buildQuorum(List<HostAndPort> hostAndPorts, int defaultPort) { List<String> entries = new ArrayList<String>(hostAndPorts.size()); for (Hos...
3.68
hbase_MetaFixer_createRegionInfosForHoles
/** * Create a new {@link RegionInfo} corresponding to each provided "hole" pair. */ private static List<RegionInfo> createRegionInfosForHoles(final List<Pair<RegionInfo, RegionInfo>> holes) { final List<RegionInfo> newRegionInfos = holes.stream().map(MetaFixer::getHoleCover) .filter(Optional::isPresent).map(...
3.68
morf_ColumnBean_toString
/** * @see java.lang.Object#toString() */ @Override public String toString() { return this.toStringHelper(); }
3.68
hadoop_BigDecimalSplitter_split
/** * Returns a list of BigDecimals one element longer than the list of input splits. * This represents the boundaries between input splits. * All splits are open on the top end, except the last one. * * So the list [0, 5, 8, 12, 18] would represent splits capturing the intervals: * * [0, 5) * [5, 8) * [8, 12)...
3.68
framework_UIConnector_getThemeUrl
/** * Internal helper to get the theme URL for a given theme * * @since 7.3 * @param theme * the name of the theme * @return The URL the theme can be loaded from */ private String getThemeUrl(String theme) { String themeUrl = getConnection() .translateVaadinUri(ApplicationConstants.VAA...
3.68
hudi_BufferedRandomAccessFile_getFilePointer
/** * @return current file position */ @Override public long getFilePointer() { return this.currentPosition; }
3.68
druid_PoolUpdater_init
/** * Create a ScheduledExecutorService to remove unused DataSources. */ public void init() { if (inited) { return; } synchronized (this) { if (inited) { return; } if (intervalSeconds < 10) { LOG.warn("CAUTION: Purge interval has been set to " + inte...
3.68
flink_MapTypeInfo_getValueTypeInfo
/** Gets the type information for the values in the map */ public TypeInformation<V> getValueTypeInfo() { return valueTypeInfo; }
3.68
hadoop_ProducerConsumer_shutdown
/** * Shutdown ProducerConsumer worker thread-pool without waiting for * completion of any pending work. */ public void shutdown() { if (hasWork()) { LOG.warn("Shutdown() is called but there are still unprocessed work!"); } executor.shutdownNow(); }
3.68
hbase_CellCounter_main
/** * Main entry point. * @param args The command line parameters. * @throws Exception When running the job fails. */ public static void main(String[] args) throws Exception { int errCode = ToolRunner.run(HBaseConfiguration.create(), new CellCounter(), args); System.exit(errCode); }
3.68
flink_HiveShim_isMaterializedView
/** Checks whether a hive table is a materialized view. */ default boolean isMaterializedView(org.apache.hadoop.hive.ql.metadata.Table table) { return false; }
3.68
framework_Embedded_getParameter
/** * Gets the value of an object parameter. Parameters are optional * information, and they are passed to the instantiated object. Parameters * are are stored as name value pairs. * * @return the Value of parameter or null if not found. */ public String getParameter(String name) { return getState(false).para...
3.68
hadoop_TFile_getValue
/** * Copy value into user-supplied buffer. User supplied buffer must be * large enough to hold the whole value (starting from the offset). The * value part of the key-value pair pointed by the current cursor is not * cached and can only be examined once. Calling any of the following * functions more than once wit...
3.68
hadoop_IsActiveServlet_doGet
/** * Check whether this instance is the Active one. * @param req HTTP request * @param resp HTTP response to write to */ @Override public void doGet( final HttpServletRequest req, final HttpServletResponse resp) throws IOException { // By default requests are persistent. We don't want long-lived connect...
3.68
framework_SQLContainer_isAutoCommit
/** * Returns status of the auto commit mode. * * @return true if auto commit mode is enabled */ public boolean isAutoCommit() { return autoCommit; }
3.68
hadoop_TimedHealthReporterService_serviceStart
/** * Method used to start the health monitoring. */ @Override public void serviceStart() throws Exception { if (task == null) { throw new Exception("Health reporting task hasn't been set!"); } timer = new Timer("HealthReporterService-Timer", true); long delay = 0; if (runBeforeStartup) { delay = in...
3.68
flink_Tuple21_copy
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple21< T0, T1, T2, T3, T4, T5, T6, T7, ...
3.68
querydsl_ComparableExpression_ltAll
/** * Create a {@code this < all right} expression * * @param right rhs of the comparison * @return this &lt; all right */ public BooleanExpression ltAll(SubQueryExpression<? extends T> right) { return lt(ExpressionUtils.all(right)); }
3.68
framework_VTooltip_initializeAssistiveTooltips
/** * Initialize the tooltip overlay for assistive devices. * * @since 7.2.4 */ public void initializeAssistiveTooltips() { updatePosition(null, true); setTooltipText(new TooltipInfo(" ")); showTooltip(); hideTooltip(); description.getParent().getElement().getStyle().clearWidth(); }
3.68
hadoop_EntityRowKeyPrefix_getRowKeyPrefix
/* * (non-Javadoc) * * @see * org.apache.hadoop.yarn.server.timelineservice.storage.application. * RowKeyPrefix#getRowKeyPrefix() */ public byte[] getRowKeyPrefix() { return super.getRowKey(); }
3.68
hbase_PermissionStorage_getPermissions
/** * Reads user permission assignments stored in the <code>l:</code> column family of the first * table row in <code>_acl_</code>. * <p> * See {@link PermissionStorage class documentation} for the key structure used for storage. * </p> */ static ListMultimap<String, UserPermission> getPermissions(Configuration c...
3.68
hadoop_AbfsOperationMetrics_getBytesSuccessful
/** * * @return bytes successfully transferred. */ AtomicLong getBytesSuccessful() { return bytesSuccessful; }
3.68
hbase_MobUtils_getMobTableDir
/** * Gets the table dir of the mob files under the qualified HBase root dir. It's * {rootDir}/mobdir/data/${namespace}/${tableName} * @param rootDir The qualified path of HBase root directory. * @param tableName The name of table. * @return The table dir of the mob file. */ public static Path getMobTableDir(Pa...
3.68
querydsl_StringExpression_coalesce
/** * Create a {@code coalesce(this, args...)} expression * * @param args additional arguments * @return coalesce */ @Override public StringExpression coalesce(String... args) { Coalesce<String> coalesce = new Coalesce<String>(getType(), mixin); for (String arg : args) { coalesce.add(arg); } ...
3.68
hudi_KafkaConnectHdfsProvider_buildCheckpointStr
/** * Convert map contains max offset of each partition to string. * * @param topic Topic name * @param checkpoint Map with partition as key and max offset as value * @return Checkpoint string */ private static String buildCheckpointStr(final String topic, final HashM...
3.68
hbase_Encryption_getSecretKeyForSubject
/** * Resolves a key for the given subject * @return a key for the given subject * @throws IOException if the key is not found */ public static Key getSecretKeyForSubject(String subject, Configuration conf) throws IOException { KeyProvider provider = getKeyProvider(conf); if (provider != null) { try { ...
3.68
hadoop_CommitResponse_newInstance
/** * Create a Commit Response. * @return Commit Response. */ @Private @Unstable public static CommitResponse newInstance() { return Records.newRecord(CommitResponse.class); }
3.68
Activiti_JsonConverterUtil_gatherLongPropertyFromJsonNodes
/** * Loops through a list of {@link JsonNode} instances, and stores the given property with given type in the returned list. * * In Java 8, this probably could be done a lot cooler. */ public static Set<Long> gatherLongPropertyFromJsonNodes(Iterable<JsonNode> jsonNodes, String propertyName) { Set<Long> result = ...
3.68
hbase_CellComparatorImpl_getCellComparator
/** * Utility method that makes a guess at comparator to use based off passed tableName. Use in * extreme when no comparator specified. * @return CellComparator to use going off the {@code tableName} passed. */ public static CellComparator getCellComparator(byte[] tableName) { // FYI, TableName.toBytes does not c...
3.68
hbase_HBaseTestingUtility_getHBaseClusterInterface
/** * Returns the HBaseCluster instance. * <p> * Returned object can be any of the subclasses of HBaseCluster, and the tests referring this * should not assume that the cluster is a mini cluster or a distributed one. If the test only * works on a mini cluster, then specific method {@link #getMiniHBaseCluster()} ca...
3.68
pulsar_ConsumerConfiguration_setAckTimeout
/** * Set the timeout for unacked messages, truncated to the nearest millisecond. The timeout needs to be greater than * 10 seconds. * * @param ackTimeout * for unacked messages. * @param timeUnit * unit in which the timeout is provided. * @return {@link ConsumerConfiguration} */ public C...
3.68
hudi_BaseHoodieWriteClient_tryUpgrade
/** * Upgrades the hoodie table if need be when moving to a new Hudi version. * This method is called within a lock. Try to avoid double locking from within this method. * @param metaClient instance of {@link HoodieTableMetaClient} to use. * @param instantTime instant time of interest if we have one. */ protected ...
3.68
hbase_ZKSplitLog_isRescanNode
/** * Checks if the given path represents a rescan node. * @param zkw reference to the {@link ZKWatcher} which also contains configuration and constants * @param path the absolute path, starts with '/' * @return whether the path represents a rescan node */ public static boolean isRescanNode(ZKWatcher zkw, String ...
3.68
hbase_KeyValue_getKeyOffset
/** Returns Key offset in backing buffer.. */ public int getKeyOffset() { return this.offset + ROW_OFFSET; }
3.68
flink_ParallelismProvider_getParallelism
/** * Returns the parallelism for this instance. * * <p>The parallelism denotes how many parallel instances of a source or sink will be spawned * during the execution. * * <p>Enforcing a different parallelism for sources/sinks might mess up the changelog if the * output/input is not {@link ChangelogMode#insertOn...
3.68
morf_DatabaseMetaDataProvider_loadView
/** * Loads a view. * * @param viewName Name of the view. * @return The view metadata. */ protected View loadView(AName viewName) { final RealName realViewName = viewNames.get().get(viewName); if (realViewName == null) { throw new IllegalArgumentException("View [" + viewName + "] not found."); } retu...
3.68
hadoop_OBSCommonUtils_deleteObject
/** * Delete an object. Increments the {@code OBJECT_DELETE_REQUESTS} and write * operation statistics. * * @param owner the owner OBSFileSystem instance * @param key key to blob to delete. * @throws IOException on any failure to delete object */ static void deleteObject(final OBSFileSystem owner, final String...
3.68