name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_ZoneReencryptionStatus_setZoneName
/** * Set the zone name. The zone name is resolved from inode id and set during * a listReencryptionStatus call, for the crypto admin to consume. */ public void setZoneName(final String name) { Preconditions.checkNotNull(name, "zone name cannot be null"); zoneName = name; }
3.68
flink_RocksDBNativeMetricOptions_enableIsWriteStopped
/** Returns 1 if write has been stopped. */ public void enableIsWriteStopped() { this.properties.add(RocksDBProperty.IsWriteStopped.getRocksDBProperty()); }
3.68
hadoop_HadoopExecutors_shutdown
/** * Helper routine to shutdown a {@link ExecutorService}. Will wait up to a * certain timeout for the ExecutorService to gracefully shutdown. If the * ExecutorService did not shutdown and there are still tasks unfinished after * the timeout period, the ExecutorService will be notified to forcibly shut * down. An...
3.68
framework_CalendarMonthDropHandler_emphasis
/** * Add CSS style name for the currently emphasized day */ private void emphasis() { if (currentTargetElement != null && currentTargetDay != null) { currentTargetDay.addEmphasisStyle(); } }
3.68
dubbo_DynamicDirectory_getOriginalConsumerUrl
/** * The original consumer url * * @return URL */ public URL getOriginalConsumerUrl() { return this.consumerUrl; }
3.68
flink_StreamConfig_setVertexNonChainedOutputs
/** * Sets the job vertex level non-chained outputs. The given output list must have the same order * with {@link JobVertex#getProducedDataSets()}. */ public void setVertexNonChainedOutputs(List<NonChainedOutput> nonChainedOutputs) { toBeSerializedConfigObjects.put(VERTEX_NONCHAINED_OUTPUTS, nonChainedOutputs); ...
3.68
hbase_ProcedureManagerHost_loadUserProcedures
/** * Load system procedures. Read the class names from configuration. Called by constructor. */ protected void loadUserProcedures(Configuration conf, String confKey) { Class<?> implClass = null; // load default procedures from configure file String[] defaultProcClasses = conf.getStrings(confKey); if (defaul...
3.68
graphhopper_SpatialKeyAlgo_getBits
/** * @return the number of involved bits */ public int getBits() { return allBits; }
3.68
pulsar_AbstractDispatcherMultipleConsumers_getFirstConsumerIndexOfPriority
/** * Finds index of first consumer in list which has same priority as given targetPriority. * * @param targetPriority * @return */ private int getFirstConsumerIndexOfPriority(int targetPriority) { for (int i = 0; i < consumerList.size(); i++) { if (consumerList.get(i).getPriorityLevel() == targetPrior...
3.68
flink_MathUtils_roundDownToPowerOf2
/** * Decrements the given number down to the closest power of two. If the argument is a power of * two, it remains unchanged. * * @param value The value to round down. * @return The closest value that is a power of two and less or equal than the given value. */ public static int roundDownToPowerOf2(int value) { ...
3.68
hadoop_Quota_isMountEntry
/** * Is the path a mount entry. * * @param path the path to be checked. * @return {@code true} if path is a mount entry; {@code false} otherwise. */ private boolean isMountEntry(String path) { return router.getQuotaManager().isMountEntry(path); }
3.68
hbase_RequestConverter_buildRollWALWriterRequest
/** * Create a new RollWALWriterRequest * @return a ReplicateWALEntryRequest */ public static RollWALWriterRequest buildRollWALWriterRequest() { return RollWALWriterRequest.getDefaultInstance(); }
3.68
hadoop_SubApplicationEntity_isSubApplicationEntity
/** * Checks if the input TimelineEntity object is an SubApplicationEntity. * * @param te TimelineEntity object. * @return true if input is an SubApplicationEntity, false otherwise */ public static boolean isSubApplicationEntity(TimelineEntity te) { return (te != null && te instanceof SubApplicationEntity); }
3.68
hbase_RequestConverter_buildMutateRequest
/** * Create a protocol buffer MutateRequest for a delete * @return a mutate request */ public static MutateRequest buildMutateRequest(final byte[] regionName, final Delete delete) throws IOException { MutateRequest.Builder builder = MutateRequest.newBuilder(); RegionSpecifier region = buildRegionSpecifier(Reg...
3.68
Activiti_ExecutionGraphUtil_orderFromRootToLeaf
/** * Takes in a collection of executions belonging to the same process instance. Orders the executions in a list, first elements are the leaf, last element is the root elements. */ public static List<ExecutionEntity> orderFromRootToLeaf(Collection<ExecutionEntity> executions) { List<ExecutionEntity> orderedList = ...
3.68
hbase_FavoredStochasticBalancer_generateFavoredNodesForMergedRegion
/** * Generate favored nodes for a region during merge. Choose the FN from one of the sources to keep * it simple. */ @Override public void generateFavoredNodesForMergedRegion(RegionInfo merged, RegionInfo[] mergeParents) throws IOException { updateFavoredNodesForRegion(merged, fnm.getFavoredNodes(mergeParents[0...
3.68
flink_BatchShuffleReadBufferPool_requestBuffers
/** * Requests a collection of buffers (determined by {@link #numBuffersPerRequest}) from this * buffer pool. */ public List<MemorySegment> requestBuffers() throws Exception { List<MemorySegment> allocated = new ArrayList<>(numBuffersPerRequest); synchronized (buffers) { checkState(!destroyed, "Buffe...
3.68
flink_FlinkRelMdCollation_project
/** Helper method to determine a {@link Project}'s collation. */ public static List<RelCollation> project( RelMetadataQuery mq, RelNode input, List<? extends RexNode> projects) { final SortedSet<RelCollation> collations = new TreeSet<>(); final List<RelCollation> inputCollations = mq.collations(input); ...
3.68
framework_VUpload_enableUpload
/** For internal use only. May be removed or replaced in the future. */ public void enableUpload() { fu.getElement().setPropertyBoolean("disabled", false); enabled = true; updateEnabledForSubmitButton(); if (submitted) { /* * An old request is still in progress (most likely cancelled), ...
3.68
framework_AbstractInMemoryContainer_removeFilter
/** * Remove a specific container filter and re-filter the view (if necessary). * * This can be used to implement * {@link Filterable#removeContainerFilter(Container.Filter)} . */ protected void removeFilter(Filter filter) { for (Iterator<Filter> iterator = getFilters().iterator(); iterator .hasNex...
3.68
dubbo_ParamParserManager_providerParamParse
/** * provider Design Description: * <p> * Object[] args=new Object[0]; * List<Object> argsList=new ArrayList<>;</> * <p> * setValueByIndex(int index,Object value); * <p> * args=toArray(new Object[0]); */ public static Object[] providerParamParse(ProviderParseContext parseContext) { List<ArgInfo> args = ...
3.68
hmily_AggregateBinder_binder
/** * binder to AggregateBinder. * * @param target ta * @param env the env * @return aggregate binder */ static AggregateBinder<?> binder(final BindData<?> target, final Binder.Env env) { DataType type = target.getType(); //如果map集合. if (type.isMap()) { return new MapBinder(env); } else ...
3.68
hadoop_BalanceProcedureScheduler_init
/** * Init the scheduler. * * @param recoverJobs whether to recover all the jobs from journal or not. */ public synchronized void init(boolean recoverJobs) throws IOException { this.runningQueue = new LinkedBlockingQueue<>(); this.delayQueue = new DelayQueue<>(); this.recoverQueue = new LinkedBlockingQueue<>(...
3.68
AreaShop_StackCommand_countToName
/** * Build a name from a count, with the right length. * @param template Template to put the name in (# to put the count there, otherwise count is appended) * @param count Number to use * @return name with prepended 0's */ private String countToName(String template, int count) { StringBuilder counterName = new ...
3.68
hudi_HoodieAvroUtils_convertValueForSpecificDataTypes
/** * This method converts values for fields with certain Avro/Parquet data types that require special handling. * * @param fieldSchema avro field schema * @param fieldValue avro field value * @return field value either converted (for certain data types) or as it is. */ public static Object convertValueForSpecif...
3.68
zxing_BitArray_set
/** * Sets bit i. * * @param i bit to set */ public void set(int i) { bits[i / 32] |= 1 << (i & 0x1F); }
3.68
hadoop_OBSCommonUtils_intOption
/** * Get a integer option not smaller than the minimum allowed value. * * @param conf configuration * @param key key to look up * @param defVal default value * @param min minimum value * @return the value * @throws IllegalArgumentException if the value is below the minimum */ static int intOption(fina...
3.68
querydsl_GeometryExpressions_setSRID
/** * Sets the SRID on a geometry to a particular integer value. * * @param expr geometry * @param srid SRID * @param <T> * @return converted geometry */ public static <T extends Geometry> GeometryExpression<T> setSRID(Expression<T> expr, int srid) { return geometryOperation(expr.getType(), SpatialOps.SET_SR...
3.68
morf_MergeStatement_getTableUniqueKey
/** * Gets a list of the fields used as the key upon which to match. * * @return the table unique key. */ public List<AliasedField> getTableUniqueKey() { return tableUniqueKey; }
3.68
MagicPlugin_CustomProjectileAction_adjustStartLocation
// This is used by EntityProjectile when first spawning the entity protected Location adjustStartLocation(Location location) { if (startDistance != 0) { Vector velocity = location.getDirection().clone().normalize(); location.add(velocity.clone().multiply(startDistance)); } return location; }
3.68
hadoop_ProtocolProxy_getProxy
/* * Get the proxy */ public T getProxy() { return proxy; }
3.68
flink_JoinOperatorSetsBase_where
/** * Continues a Join transformation and defines a {@link KeySelector} function for the first join * {@link DataSet}. * * <p>The KeySelector function is called for each element of the first DataSet and extracts a * single key value on which the DataSet is joined. * * @param keySelector The KeySelector function ...
3.68
hbase_StripeStoreFileManager_nonOpenRowCompare
/** * Compare two keys. Keys must not be open (isOpen(row) == false). */ private final int nonOpenRowCompare(byte[] k1, byte[] k2) { assert !isOpen(k1) && !isOpen(k2); return Bytes.compareTo(k1, k2); }
3.68
hudi_WriteMarkers_createIfNotExists
/** * Creates a marker if the marker does not exist. * This can invoke marker-based early conflict detection when enabled for multi-writers. * * @param partitionPath partition path in the table * @param fileName file name * @param type write IO type * @param writeConfig Hudi write configs. *...
3.68
hbase_LocalHBaseCluster_main
/** * Test things basically work. */ public static void main(String[] args) throws IOException { Configuration conf = HBaseConfiguration.create(); LocalHBaseCluster cluster = new LocalHBaseCluster(conf); cluster.startup(); try (Connection connection = ConnectionFactory.createConnection(conf); Admin admin ...
3.68
hadoop_DiskBalancerDataNode_setDataNodeName
/** * Sets node's DNS name. * * @param name - Data node name */ public void setDataNodeName(String name) { this.dataNodeName = name; }
3.68
rocketmq-connect_WorkerDirectTask_resetOffset
/** * Reset the offsets for the given partition. * * @param offsets the map of offsets for targetPartition. */ @Override public void resetOffset(Map<RecordPartition, RecordOffset> offsets) { // no-op }
3.68
hadoop_StorageLocationChecker_check
/** * Initiate a check on the supplied storage volumes and return * a list of healthy volumes. * * StorageLocations are returned in the same order as the input * for compatibility with existing unit tests. * * @param conf HDFS configuration. * @param dataDirs list of volumes to check. * @return returns a list ...
3.68
morf_SqlServerDialect_connectionTestStatement
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#connectionTestStatement() */ @Override public String connectionTestStatement() { return "select 1"; }
3.68
hadoop_RouterPermissionChecker_checkPermission
/** * Whether a mount table entry can be accessed by the current context. * * @param mountTable * MountTable being accessed * @param access * type of action being performed on the mount table entry * @throws AccessControlException * if mount table cannot be accessed */ public void c...
3.68
flink_CopyOnWriteStateMapSnapshot_moveChainsToBackOfArray
/** * Move the chains in snapshotData to the back of the array, and return the index of the * first chain from the front. */ int moveChainsToBackOfArray() { int index = snapshotData.length - 1; // find the first null chain from the back while (index >= 0) { if (snapshotData[index] == null) { ...
3.68
hadoop_Server_loadServices
/** * Loads services defined in <code>services</code> and * <code>services.ext</code> and de-dups them. * * @return List of final services to initialize. * * @throws ServerException throw if the services could not be loaded. */ protected List<Service> loadServices() throws ServerException { try { Map<Class...
3.68
flink_SocketClientSink_invoke
/** * Called when new data arrives to the sink, and forwards it to Socket. * * @param value The value to write to the socket. */ @Override public void invoke(IN value) throws Exception { byte[] msg = schema.serialize(value); try { outputStream.write(msg); if (autoFlush) { output...
3.68
hadoop_Quota_aggregateQuota
/** * Aggregate quota that queried from sub-clusters. * @param path Federation path of the results. * @param results Quota query result. * @return Aggregated Quota. */ QuotaUsage aggregateQuota(String path, Map<RemoteLocation, QuotaUsage> results) throws IOException { long nsCount = 0; long ssCount = 0; ...
3.68
hbase_ProcedureMember_controllerConnectionFailure
/** * The connection to the rest of the procedure group (member and coordinator) has been * broken/lost/failed. This should fail any interested subprocedure, but not attempt to notify * other members since we cannot reach them anymore. * @param message description of the error * @param cause the actual cause o...
3.68
framework_VColorPickerArea_getText
/** * Gets the caption's contents as text. * * @return the caption's text */ @Override public String getText() { return caption.getText(); }
3.68
flink_StringData_fromString
/** Creates an instance of {@link StringData} from the given {@link String}. */ static StringData fromString(String str) { return BinaryStringData.fromString(str); }
3.68
flink_CompactingHashTable_fillCache
/** * utility function that inserts all entries from a bucket and its overflow buckets into the * cache * * @return true if last bucket was not reached yet * @throws IOException */ private boolean fillCache() throws IOException { if (currentBucketIndex >= table.numBuckets) { return false; } Me...
3.68
morf_DataValueLookup_defaultHashCode
/** * Default hashCode implementation for instances. * * @param obj The object. * @return The hashCode. */ public static int defaultHashCode(DataValueLookup obj) { final int prime = 31; int result = 1; for (DataValue value : obj.getValues()) { result = prime * result + value.hashCode(); } return resu...
3.68
morf_SqlParameter_equals
/** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SqlParameter other = (SqlParameter) obj; return new EqualsBuilder() .appendSupe...
3.68
framework_SelectAllConstantViewport_getTestDescription
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() */ @Override protected String getTestDescription() { return "The scroll position of a table with many items should remain constant if all items are selected."; }
3.68
hbase_HRegion_batchMutate
/** * Perform a batch of mutations. * <p/> * Operations in a batch are stored with highest durability specified of for all operations in a * batch, except for {@link Durability#SKIP_WAL}. * <p/> * This function is called from {@link #batchReplay(WALSplitUtil.MutationReplay[], long)} with * {@link ReplayBatchOper...
3.68
framework_MenuBarFocus_setup
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. * VaadinRequest) */ @Override protected void setup(VaadinRequest request) { final MenuBar bar = buildMenu(); Button focusButton = buildButton(bar); addComponent(bar); addComponent(focusButton); getL...
3.68
dubbo_LfuCache_get
/** * API to return stored value using a key against the calling thread specific store. * @param key Unique identifier for cache lookup * @return Return stored object against key */ @SuppressWarnings("unchecked") @Override public Object get(Object key) { return store.get(key); }
3.68
flink_MemoryMappedBoundedData_getSize
/** * Gets the number of bytes of all written data (including the metadata in the buffer headers). */ @Override public long getSize() { long size = 0L; for (ByteBuffer bb : fullBuffers) { size += bb.remaining(); } if (currentBuffer != null) { size += currentBuffer.position(); } ...
3.68
hibernate-validator_TypeResolutionHelper_getTypeResolver
/** * @return the typeResolver */ public TypeResolver getTypeResolver() { return typeResolver; }
3.68
hmily_DateUtils_parseDate
/** * Parse date string. * * @param date the date * @return the string */ public static String parseDate(final Date date) { Instant instant = date.toInstant(); ZoneId zone = ZoneId.systemDefault(); LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone); return formatLocalDateTime(loca...
3.68
querydsl_JTSGeometryExpression_distance
/** * Returns the shortest distance between any two Points in the two geometric objects as * calculated in the spatial reference system of this geometric object. Because the geometries * are closed, it is possible to find a point on each geometric object involved, such that the * distance between these 2 points is ...
3.68
flink_AbstractStreamOperatorV2_getRuntimeContext
/** * Returns a context that allows the operator to query information about the execution and also * to interact with systems such as broadcast variables and managed state. This also allows to * register timers. */ public StreamingRuntimeContext getRuntimeContext() { return runtimeContext; }
3.68
flink_BatchTask_openChainedTasks
/** * Opens all chained tasks, in the order as they are stored in the array. The opening process * creates a standardized log info message. * * @param tasks The tasks to be opened. * @param parent The parent task, used to obtain parameters to include in the log message. * @throws Exception Thrown, if the opening ...
3.68
hudi_AvroInternalSchemaConverter_convertToField
/** Convert an avro schema into internal type. */ public static Type convertToField(Schema schema) { return buildTypeFromAvroSchema(schema); }
3.68
hbase_EncodedDataBlock_getSize
/** * Find the size of minimal buffer that could store compressed data. * @return Size in bytes of compressed data. */ public int getSize() { return getEncodedData().length; }
3.68
hadoop_TimelineWriteResponse_addError
/** * Add a single {@link TimelineWriteError} instance into the existing list. * * @param error * a single {@link TimelineWriteError} instance */ public void addError(TimelineWriteError error) { errors.add(error); }
3.68
morf_Deployment_writeUpgradeSteps
/** * Add an upgrade step for each upgrade step. * * <p>The {@link Deployment} class ensures that all contributed domain tables are written in the database, but we need to * ensure that the upgrade steps that were used to create are in written so that next time the application is run the upgrade * doesn't try to r...
3.68
dubbo_RpcUtils_attachInvocationIdIfAsync
/** * Idempotent operation: invocation id will be added in async operation by default * * @param url * @param inv */ public static void attachInvocationIdIfAsync(URL url, Invocation inv) { if (isAttachInvocationId(url, inv) && getInvocationId(inv) == null && inv instanceof RpcInvocation) { inv.setAttac...
3.68
hbase_MiniHBaseCluster_flushcache
/** * Call flushCache on all regions of the specified table. */ public void flushcache(TableName tableName) throws IOException { for (JVMClusterUtil.RegionServerThread t : this.hbaseCluster.getRegionServers()) { for (HRegion r : t.getRegionServer().getOnlineRegionsLocalContext()) { if (r.getTableDescripto...
3.68
hbase_HBaseTestingUtility_moveRegionAndWait
/** * Move region to destination server and wait till region is completely moved and online * @param destRegion region to move * @param destServer destination server of the region */ public void moveRegionAndWait(RegionInfo destRegion, ServerName destServer) throws InterruptedException, IOException { HMaster ma...
3.68
hbase_EncryptionTest_testKeyProvider
/** * Check that the configured key provider can be loaded and initialized, or throw an exception. */ public static void testKeyProvider(final Configuration conf) throws IOException { String providerClassName = conf.get(HConstants.CRYPTO_KEYPROVIDER_CONF_KEY, KeyStoreKeyProvider.class.getName()); Boolean resu...
3.68
rocketmq-connect_RecordOffsetManagement_awaitAllMessages
/** * await all messages * * @param timeout * @param timeUnit * @return */ public boolean awaitAllMessages(long timeout, TimeUnit timeUnit) { // Create a new message drain latch as a local variable to avoid SpotBugs warnings about inconsistent synchronization // on an instance variable when invoking Count...
3.68
hadoop_FileSystemReleaseFilter_doFilter
/** * It delegates the incoming request to the <code>FilterChain</code>, and * at its completion (in a finally block) releases the filesystem instance * back to the {@link FileSystemAccess} service. * * @param servletRequest servlet request. * @param servletResponse servlet response. * @param filterChain filter ...
3.68
hbase_OrderedBytes_decodeBlobCopy
/** * Decode a Blob value, byte-for-byte copy. * @see #encodeBlobCopy(PositionedByteRange, byte[], int, int, Order) */ public static byte[] decodeBlobCopy(PositionedByteRange src) { byte header = src.get(); if (header == NULL || header == DESCENDING.apply(NULL)) { return null; } assert header == BLOB_COP...
3.68
hadoop_ServerWebApp_contextInitialized
/** * Initializes the <code>ServletContextListener</code> which initializes * the Server. * * @param event servelt context event. */ @Override public void contextInitialized(ServletContextEvent event) { try { init(); } catch (ServerException ex) { event.getServletContext().log("ERROR: " + ex.getMessage...
3.68
morf_AlteredTable_columns
/** * @see org.alfasoftware.morf.metadata.Table#columns() */ @Override public List<Column> columns() { return columns; }
3.68
flink_ParameterTool_mergeWith
/** * Merges two {@link ParameterTool}. * * @param other Other {@link ParameterTool} object * @return The Merged {@link ParameterTool} */ public ParameterTool mergeWith(ParameterTool other) { final Map<String, String> resultData = CollectionUtil.newHashMapWithExpectedSize(data.size() + other.data.s...
3.68
hadoop_DistributedCache_setArchiveTimestamps
/** * This is to check the timestamp of the archives to be localized. * Used by internal MapReduce code. * @param conf Configuration which stores the timestamp's * @param timestamps comma separated list of timestamps of archives. * The order should be the same as the order in which the archives are added. */ @Dep...
3.68
framework_CssLayout_writeDesign
/* * (non-Javadoc) * * @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element * , com.vaadin.ui.declarative.DesignContext) */ @Override public void writeDesign(Element design, DesignContext designContext) { // write default attributes super.writeDesign(design, designContext); CssLayou...
3.68
hudi_HoodieLogBlock_deflate
/** * After the content bytes is converted into the required DataStructure by a logBlock, deflate the content to release * byte [] and relieve memory pressure when GC kicks in. NOTE: This still leaves the heap fragmented */ protected void deflate() { content = Option.empty(); }
3.68
hudi_CleanPlanner_getPartitionPathsForCleanByCommits
/** * Return partition paths for cleaning by commits mode. * @param instantToRetain Earliest Instant to retain * @return list of partitions * @throws IOException */ private List<String> getPartitionPathsForCleanByCommits(Option<HoodieInstant> instantToRetain) throws IOException { if (!instantToRetain.isPresent()...
3.68
hudi_BaseHoodieWriteClient_preCommit
/** * Any pre-commit actions like conflict resolution goes here. * @param inflightInstant instant of inflight operation. * @param metadata commit metadata for which pre commit is being invoked. */ protected void preCommit(HoodieInstant inflightInstant, HoodieCommitMetadata metadata) { // Create a Hoodie table aft...
3.68
morf_AbstractSqlDialectTest_shouldGenerateCorrectSqlForMathOperations4
/** * Test for proper SQL mathematics operation generation from DSL expressions. * <p> * Bracket should be generated for subexpression "b+100". Even without explicit * {@link org.alfasoftware.morf.sql.SqlUtils#bracket(MathsField)} call. * </p> */ @Test public void shouldGenerateCorrectSqlForMathOperations4() { ...
3.68
morf_SqlDialect_getSqlForTrim
/** * Converts the TRIM function into SQL. * * @param function the function to convert. * @return a string representation of the SQL. */ protected String getSqlForTrim(Function function) { return "TRIM(" + getSqlFrom(function.getArguments().get(0)) + ")"; }
3.68
hbase_TraceUtil_tracedFuture
/** * Trace an asynchronous operation. */ public static <T> CompletableFuture<T> tracedFuture(Supplier<CompletableFuture<T>> action, String spanName) { Span span = createSpan(spanName); try (Scope ignored = span.makeCurrent()) { CompletableFuture<T> future = action.get(); endSpan(future, span); retu...
3.68
framework_UIDL_getStringArrayVariableAsSet
/** * Gets the value of the named String[] variable as a Set of Strings. * * @param name * the name of the variable * @return the value of the variable */ public Set<String> getStringArrayVariableAsSet(final String name) { final HashSet<String> s = new HashSet<>(); JsArrayString a = var().getJS...
3.68
flink_ShuffleMaster_unregisterJob
/** * Unregisters the target job from this shuffle master, which means the corresponding job has * reached a global termination state and all the allocated resources except for the cluster * partitions can be cleared. * * @param jobID ID of the target job to be unregistered. */ default void unregisterJob(JobID jo...
3.68
hadoop_RMStateStoreUtils_readRMDelegationTokenIdentifierData
/** * Returns the RM Delegation Token data from the {@link DataInputStream} as a * {@link RMDelegationTokenIdentifierData}. It can handle both the current * and old (non-protobuf) formats. * * @param fsIn The {@link DataInputStream} containing RM Delegation Token data * @return An {@link RMDelegationTokenIdentif...
3.68
zxing_GeoParsedResult_getLongitude
/** * @return longitude in degrees */ public double getLongitude() { return longitude; }
3.68
hbase_Timer_updateMillis
/** * Update the timer with the given duration in milliseconds * @param durationMillis the duration of the event in ms */ default void updateMillis(long durationMillis) { update(durationMillis, TimeUnit.NANOSECONDS); }
3.68
hbase_BackupAdminImpl_finalizeDelete
/** * Updates incremental backup set for every backupRoot * @param tablesMap map [backupRoot: {@code Set<TableName>}] * @param table backup system table * @throws IOException if a table operation fails */ private void finalizeDelete(Map<String, HashSet<TableName>> tablesMap, BackupSystemTable table) throws I...
3.68
hudi_SchedulerConfGenerator_getSparkSchedulingConfigs
/** * Helper to set Spark Scheduling Configs dynamically. * * @param cfg Config for HoodieDeltaStreamer */ public static Map<String, String> getSparkSchedulingConfigs(HoodieStreamer.Config cfg) throws Exception { scala.Option<String> scheduleModeKeyOption = new SparkConf().getOption(SPARK_SCHEDULER_MODE_KEY); f...
3.68
hibernate-validator_PlatformResourceBundleLocator_determineAvailabilityOfResourceBundleControl
/** * Check whether ResourceBundle.Control is available, which is needed for bundle aggregation. If not, we'll skip * resource aggregation. * <p> * It is *not* available * <ul> * <li>in the Google App Engine environment</li> * <li>when running HV as Java 9 named module (which would be the case when adding a modu...
3.68
hadoop_TFile_compareTo
/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); ...
3.68
hbase_AsyncBufferedMutatorBuilder_disableWriteBufferPeriodicFlush
/** * Disable the periodical flush, i.e, set the timeout to 0. */ default AsyncBufferedMutatorBuilder disableWriteBufferPeriodicFlush() { return setWriteBufferPeriodicFlush(0, TimeUnit.NANOSECONDS); }
3.68
hbase_BitSetNode_canGrow
// ======================================================================== // Grow/Merge Helpers // ======================================================================== public boolean canGrow(long procId) { if (procId <= start) { return getEnd() - procId < MAX_NODE_SIZE; } else { return procId - start ...
3.68
framework_StaticSection_getCell
/** * Returns the cell in this section that corresponds to the given * column. * * @param column * the column * @return the cell for the given column * * @throws IllegalArgumentException * if no cell was found for the column */ public CELL getCell(Column<?, ?> column) { return inter...
3.68
hadoop_FederationPolicyInitializationContext_getHomeSubcluster
/** * Returns the current home sub-cluster. Useful for default policy behaviors. * * @return the home sub-cluster. */ public SubClusterId getHomeSubcluster() { return homeSubcluster; }
3.68
flink_BinaryArrayWriter_reset
/** First, reset. */ @Override public void reset() { this.cursor = fixedSize; for (int i = 0; i < nullBitsSizeInBytes; i += 8) { segment.putLong(i, 0L); } this.segment.putInt(0, numElements); }
3.68
hadoop_AbfsHttpOperation_getConnResponseMessage
/** * Gets the connection response message. * @return response message. * @throws IOException */ String getConnResponseMessage() throws IOException { return connection.getResponseMessage(); }
3.68
querydsl_JPAExpressions_type
/** * Create a type(path) expression * * @param path entity * @return type(path) */ public static StringExpression type(EntityPath<?> path) { return Expressions.stringOperation(JPQLOps.TYPE, path); }
3.68
hbase_ReflectionUtils_logThreadInfo
/** * Log the current thread stacks at INFO level. * @param log the logger that logs the stack trace * @param title a descriptive title for the call stacks * @param minInterval the minimum time from the last */ public static void logThreadInfo(Logger log, String title, long minInterval) { boolean d...
3.68
pulsar_ConsumerConfiguration_getMessageListener
/** * @return the configured {@link MessageListener} for the consumer */ public MessageListener<byte[]> getMessageListener() { return messageListener; }
3.68