name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hibernate-validator_Filters_isWeldProxy
/** * Whether the given class is a proxy created by Weld or not. This is * the case if the given class implements the interface * {@code org.jboss.weld.bean.proxy.ProxyObject}. * * @param clazz the class of interest * * @return {@code true} if the given class is a Weld proxy, * {@code false} otherwise ...
3.68
framework_Slot_setWidgetResizeListener
/** * Sets the widget resize listener for this slot. * * @param widgetResizeListener * the listener to set, or {@code null} to remove a previously * set listener */ public void setWidgetResizeListener( ElementResizeListener widgetResizeListener) { detachListeners(); this.widg...
3.68
morf_AbstractSqlDialectTest_testSelectMinimumWithExpression
/** * Tests select statement with minimum function using more than a simple field. */ @Test public void testSelectMinimumWithExpression() { SelectStatement stmt = select(min(field(INT_FIELD).minus(literal(1)))).from(tableRef(TEST_TABLE)); assertEquals("Select scripts are not the same", expectedSelectMinimumWithEx...
3.68
morf_AbstractConnectionResources_getDataSource
/** * {@inheritDoc} * * @see org.alfasoftware.morf.jdbc.ConnectionResources#getDataSource() */ @Override public DataSource getDataSource() { return new ConnectionDetailsDataSource(); }
3.68
framework_Form_isValidationVisibleOnCommit
/** * Is validation made automatically visible on commit? * * See setValidationVisibleOnCommit(). * * @return true if validation is made automatically visible on commit. */ public boolean isValidationVisibleOnCommit() { return validationVisibleOnCommit; }
3.68
hudi_ConsistentHashingUpdateStrategyUtils_constructPartitionToIdentifier
/** * Construct identifier for the given partitions that are under concurrent resizing (i.e., clustering). * @return map from partition to pair<instant, identifier>, where instant is the clustering instant. */ public static Map<String, Pair<String, ConsistentBucketIdentifier>> constructPartitionToIdentifier(Set<Stri...
3.68
rocketmq-connect_StandaloneConnectStartup_createConnectController
/** * Read configs from command line and create connect controller. * * @param args * @return */ private static StandaloneConnectController createConnectController(String[] args) { try { // Build the command line options. Options options = ServerUtil.buildCommandlineOptions(new Options()); ...
3.68
flink_ImmutableMapState_iterator
/** * Iterates over all the mappings in the state. The iterator cannot remove elements. * * @return A read-only iterator over all the mappings in the state. */ @Override public Iterator<Map.Entry<K, V>> iterator() { return Collections.unmodifiableSet(state.entrySet()).iterator(); }
3.68
hadoop_OBSFileSystem_checkPath
/** * Check that a Path belongs to this FileSystem. Unlike the superclass, this * version does not look at authority, but only hostname. * * @param path the path to check * @throws IllegalArgumentException if there is an FS mismatch */ @Override public void checkPath(final Path path) { OBSLoginHelper.checkPath(...
3.68
flink_DataSink_getPreferredResources
/** * Returns the preferred resources of this data sink. If no preferred resources have been set, * this returns the default resource profile. * * @return The preferred resources of this data sink. */ @PublicEvolving public ResourceSpec getPreferredResources() { return this.preferredResources; }
3.68
flink_FlinkMetricContainer_updateMetrics
/** * Update Flink's internal metrics ({@link #flinkCounterCache}) with the latest metrics for a * given step. */ private void updateMetrics(String stepName) { MetricResults metricResults = asAttemptedOnlyMetricResults(metricsContainers); MetricQueryResults metricQueryResults = metricResults.quer...
3.68
querydsl_SQLExpressions_any
/** * Get an aggregate any expression for the given boolean expression */ public static BooleanExpression any(BooleanExpression expr) { return Expressions.booleanOperation(Ops.AggOps.BOOLEAN_ANY, expr); }
3.68
hadoop_JobTokenIdentifier_getUser
/** {@inheritDoc} */ @Override public UserGroupInformation getUser() { if (jobid == null || "".equals(jobid.toString())) { return null; } return UserGroupInformation.createRemoteUser(jobid.toString()); }
3.68
morf_AbstractSqlDialectTest_testCastToBigInt
/** * Tests the output of a cast to a big int. */ @Test public void testCastToBigInt() { String result = testDialect.getSqlFrom(new Cast(new FieldReference("value"), DataType.BIG_INTEGER, 10)); assertEquals(expectedBigIntCast(), result); }
3.68
morf_AbstractSqlDialectTest_testCastToDate
/** * Tests the output of a cast to a date. */ @Test public void testCastToDate() { String result = testDialect.getSqlFrom(new Cast(new FieldReference("value"), DataType.DATE, 10)); assertEquals(expectedDateCast(), result); }
3.68
framework_VaadinService_getCurrentResponse
/** * Gets the currently processed Vaadin response. The current response is * automatically defined when the request is started. The current response * can not be used in e.g. background threads because of the way server * implementations reuse response instances. * * @return the current Vaadin response instance ...
3.68
open-banking-gateway_RequestDataToSignNormalizer_canonicalStringToSign
/** * Computes shortened form (SHA-256 hash) of the request canonical string, so that it can be used in headers * (i.e. XML payment bodies can be huge, so we can hash request string) * @param toSign Request that is going to be signed * @return Short hash value of the {@code toSign} ready to be used as the request s...
3.68
hbase_HFileBlock_isWriting
/** Returns true if a block is being written */ boolean isWriting() { return state == State.WRITING; }
3.68
hbase_BloomFilterChunk_get
/** * Check if bit at specified index is 1. * @param pos index of bit * @return true if bit at specified index is 1, false if 0. */ static boolean get(int pos, ByteBuffer bloomBuf, int bloomOffset) { int bytePos = pos >> 3; // pos / 8 int bitPos = pos & 0x7; // pos % 8 // TODO access this via Util API which c...
3.68
hbase_BufferedDataBlockEncoder_compareCommonRowPrefix
/********************* common prefixes *************************/ // Having this as static is fine but if META is having DBE then we should // change this. public static int compareCommonRowPrefix(Cell left, Cell right, int rowCommonPrefix) { if (left instanceof ByteBufferExtendedCell) { ByteBufferExtendedCell bb...
3.68
flink_MemoryManager_releaseMemory
/** * Releases a memory chunk of a certain size from an owner to this memory manager. * * @param owner The owner to associate with the memory reservation, for the fallback release. * @param size size of memory to release. */ public void releaseMemory(Object owner, long size) { checkMemoryReservationPreconditio...
3.68
flink_ScalaCsvOutputFormat_setQuoteStrings
/** * Configures whether the output format should quote string values. String values are fields of * type {@link String} and {@link org.apache.flink.types.StringValue}, as well as all subclasses * of the latter. * * <p>By default, strings are not quoted. * * @param quoteStrings Flag indicating whether string fie...
3.68
morf_SqlDialect_viewDeploymentStatementsAsScript
/** * Creates SQL script to deploy a database view. * * @param view The meta data for the view to deploy. * @return The statements required to deploy the view joined into a script. */ public String viewDeploymentStatementsAsScript(View view) { final String firstLine = "-- " + getDatabaseType().identifier() + "\n...
3.68
flink_EmptyIterator_get
/** * Gets a singleton instance of the empty iterator. * * @param <E> The type of the objects (not) returned by the iterator. * @return An instance of the iterator. */ public static <E> EmptyIterator<E> get() { @SuppressWarnings("unchecked") EmptyIterator<E> iter = (EmptyIterator<E>) INSTANCE; return i...
3.68
querydsl_SQLExpressions_variance
/** * returns the variance of expr * * @param expr argument * @return variance(expr) */ public static <T extends Number> WindowOver<T> variance(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.VARIANCE, expr); }
3.68
hbase_SplitLogWorker_splitLog
/** Returns Result either DONE, RESIGNED, or ERR. */ static Status splitLog(String filename, CancelableProgressable p, Configuration conf, RegionServerServices server, LastSequenceId sequenceIdChecker, WALFactory factory) { Path walDir; FileSystem fs; try { walDir = CommonFSUtils.getWALRootDir(conf); fs...
3.68
flink_PartitioningProperty_isPartitionedOnKey
/** * Checks if this property presents a partitioning that is not random, but on a partitioning * key. * * @return True, if the data is partitioned on a key. */ public boolean isPartitionedOnKey() { return isPartitioned() && this != RANDOM_PARTITIONED; }
3.68
flink_PlanNode_getOutgoingChannels
/** * Gets a list of all outgoing channels leading to successors. * * @return A list of all channels leading to successors. */ public List<Channel> getOutgoingChannels() { return this.outChannels; }
3.68
framework_VSlider_buildBase
/** For internal use only. May be removed or replaced in the future. */ public void buildBase() { final String styleAttribute = isVertical() ? "height" : "width"; final String oppositeStyleAttribute = isVertical() ? "width" : "height"; final String domProperty = isVertical() ? "offsetHeight" : "...
3.68
hbase_CloneSnapshotProcedure_getMonitorStatus
/** * Set up monitor status if it is not created. */ private MonitoredTask getMonitorStatus() { if (monitorStatus == null) { monitorStatus = TaskMonitor.get() .createStatus("Cloning snapshot '" + snapshot.getName() + "' to table " + getTableName()); } return monitorStatus; }
3.68
hudi_AbstractRealtimeRecordReader_init
/** * Gets schema from HoodieTableMetaClient. If not, falls * back to the schema from the latest parquet file. Finally, sets the partition column and projection fields into the * job conf. */ private void init() throws Exception { LOG.info("Getting writer schema from table avro schema "); writerSchema = new Tab...
3.68
hbase_ZKMainServer_main
/** * Run the tool. * @param args Command line arguments. First arg is path to zookeepers file. */ public static void main(String[] args) throws Exception { String[] newArgs = args; if (!hasServer(args)) { // Add the zk ensemble from configuration if none passed on command-line. Configuration conf = HBas...
3.68
hbase_HFileInfo_checkFileVersion
/** * File version check is a little sloppy. We read v3 files but can also read v2 files if their * content has been pb'd; files written with 0.98. */ private void checkFileVersion(Path path) { int majorVersion = trailer.getMajorVersion(); if (majorVersion == getMajorVersion()) { return; } int minorVersi...
3.68
streampipes_AssetLinkBuilder_withLinkType
/** * Sets the link type for the AssetLink being built. * * @param linkType The link type to set. * @return The AssetLinkBuilder instance for method chaining. */ public AssetLinkBuilder withLinkType(String linkType) { this.assetLink.setLinkType(linkType); return this; }
3.68
morf_SqlDialect_getSqlForSumDistinct
/** * Converts the sum function into SQL. * * @param function the function details * @return a string representation of the SQL */ protected String getSqlForSumDistinct(Function function) { return "SUM(DISTINCT " + getSqlFrom(function.getArguments().get(0)) + ")"; }
3.68
AreaShop_FileManager_deleteRegion
/** * Remove a region from the list. * @param region The region to remove * @param giveMoneyBack use true to give money back to the player if someone is currently holding this region, otherwise false * @return true if the region has been removed, false otherwise */ public DeletingRegionEvent deleteRegion(GeneralRe...
3.68
querydsl_ExpressionUtils_operation
/** * Create a new Operation expression * * @param type type of expression * @param operator operator * @param args operation arguments * @return operation expression */ @SuppressWarnings("unchecked") public static <T> Operation<T> operation(Class<? extends T> type, Operator operator, ...
3.68
hbase_ReplicationSourceManager_removeSource
/** * Clear the metrics and related replication queue of the specified old source * @param src source to clear */ void removeSource(ReplicationSourceInterface src) { LOG.info("Done with the queue " + src.getQueueId()); this.sources.remove(src.getPeerId()); // Delete queue from storage and memory deleteQueue(...
3.68
open-banking-gateway_EncryptionWithInitVectorOper_encryptionService
/** * Symmetric Key based encryption. * @param keyId Key ID * @param keyWithIv Key value * @return Encryption service that encrypts data with symmetric key provided */ public EncryptionService encryptionService(String keyId, SecretKeyWithIv keyWithIv) { return new SymmetricEncryption( keyId, ...
3.68
framework_VFilterSelect_setSelectedCaption
/** * Sets the caption of selected item, if "scroll to page" is disabled. This * method is meant for internal use and may change in future versions. * * @since 7.7 * @param selectedCaption * the caption of selected item */ public void setSelectedCaption(String selectedCaption) { explicitSelectedCa...
3.68
flink_JoinSpec_getJoinKeySize
/** Gets number of keys in join key. */ @JsonIgnore public int getJoinKeySize() { return leftKeys.length; }
3.68
hbase_RegionCoprocessorHost_prePrepareTimeStampForDeleteVersion
/** * Supports Coprocessor 'bypass'. * @param mutation - the current mutation * @param kv - the current cell * @param byteNow - current timestamp in bytes * @param get - the get that could be used Note that the get only does not specify the family * and qualifier that should be used *...
3.68
hbase_PermissionStorage_isAclRegion
/** * Returns {@code true} if the given region is part of the {@code _acl_} metadata table. */ static boolean isAclRegion(Region region) { return ACL_TABLE_NAME.equals(region.getTableDescriptor().getTableName()); }
3.68
hbase_TableRecordReaderImpl_createKey
/** * @see org.apache.hadoop.mapred.RecordReader#createKey() */ public ImmutableBytesWritable createKey() { return new ImmutableBytesWritable(); }
3.68
pulsar_ResourceLockImpl_acquireWithNoRevalidation
// Simple operation of acquiring the lock with no retries, or checking for the lock content private CompletableFuture<Void> acquireWithNoRevalidation(T newValue) { if (log.isDebugEnabled()) { log.debug("acquireWithNoRevalidation,newValue={},version={}", newValue, version); } byte[] payload; try ...
3.68
flink_Hardware_getSizeOfPhysicalMemoryForMac
/** * Returns the size of the physical memory in bytes on a Mac OS-based operating system * * @return the size of the physical memory in bytes or {@code -1}, if the size could not be * determined */ private static long getSizeOfPhysicalMemoryForMac() { BufferedReader bi = null; try { Process pr...
3.68
graphhopper_VectorTile_removeValues
/** * <pre> * Dictionary encoding for values * </pre> * * <code>repeated .vector_tile.Tile.Value values = 4;</code> */ public Builder removeValues(int index) { if (valuesBuilder_ == null) { ensureValuesIsMutable(); values_.remove(index); onChanged(); } else { valuesBuilder_.remove(index); } ...
3.68
hadoop_SolverPreprocessor_getResourceVector
/** * Return the multi-dimension resource vector consumed by the job at specified * time. * * @param skyList the list of {@link Resource}s used by the job. * @param index the discretized time index. * @param containerMemAlloc the multi-dimension resource vector allocated to * ...
3.68
hbase_ExtendedCell_deepClone
/** * Does a deep copy of the contents to a new memory area and returns it as a new cell. * @return The deep cloned cell */ default ExtendedCell deepClone() { // When being added to the memstore, deepClone() is called and KeyValue has less heap overhead. return new KeyValue(this); }
3.68
morf_AbstractSqlDialectTest_testSelectOrderByTwoFields
/** * Tests a select with an "order by" clause with two fields. */ @Test public void testSelectOrderByTwoFields() { FieldReference fieldReference1 = new FieldReference("stringField1"); FieldReference fieldReference2 = new FieldReference("stringField2"); SelectStatement stmt = new SelectStatement(fieldReference1...
3.68
flink_OverWindowPartitioned_orderBy
/** * Specifies the time attribute on which rows are ordered. * * <p>For streaming tables, reference a rowtime or proctime time attribute here to specify the * time mode. * * <p>For batch tables, refer to a timestamp or long attribute. * * @param orderBy field reference * @return an over window with defined or...
3.68
framework_DragHandle_removeStyleName
/** * Removes existing style name from drag handle element. * * @param styleName * a CSS style name */ public void removeStyleName(String styleName) { element.removeClassName(styleName); }
3.68
flink_DataViewUtils_createDistinctViewSpec
/** Creates a special {@link DistinctViewSpec} for DISTINCT aggregates. */ public static DistinctViewSpec createDistinctViewSpec( int index, DataType distinctViewDataType) { return new DistinctViewSpec("distinctAcc_" + index, distinctViewDataType); }
3.68
cron-utils_FieldParser_parse
/** * Parse given expression for a single cron field. * * @param expression - String * @return CronFieldExpression object that with interpretation of given String parameter */ public FieldExpression parse(final String expression) { if (!StringUtils.containsAny(expression, SPECIAL_CHARS_MINUS_STAR)) { i...
3.68
flink_Execution_markFailed
/** * This method marks the task as failed, but will make no attempt to remove task execution from * the task manager. It is intended for cases where the task is known not to be running, or then * the TaskManager reports failure (in which case it has already removed the task). * * @param t The exception that cause...
3.68
hudi_KafkaConnectUtils_getRecordKeyColumns
/** * Extract the record fields. * * @param keyGenerator key generator Instance of the keygenerator. * @return Returns the record key columns separated by comma. */ public static String getRecordKeyColumns(KeyGenerator keyGenerator) { return String.join(",", keyGenerator.getRecordKeyFieldNames()); }
3.68
hbase_MergeTableRegionsProcedure_getServerName
/** * The procedure could be restarted from a different machine. If the variable is null, we need to * retrieve it. * @param env MasterProcedureEnv */ private ServerName getServerName(final MasterProcedureEnv env) { if (regionLocation == null) { regionLocation = env.getAssignmentManager().getRegionState...
3.68
hbase_HFileBlock_sanityCheck
/** * Checks if the block is internally consistent, i.e. the first * {@link HConstants#HFILEBLOCK_HEADER_SIZE} bytes of the buffer contain a valid header consistent * with the fields. Assumes a packed block structure. This function is primary for testing and * debugging, and is not thread-safe, because it alters th...
3.68
framework_DeclarativeItemEnabledProvider_addDisabled
/** * Adds the {@code item} to disabled items list. * * @param item * a data item */ protected void addDisabled(T item) { disabled.add(item); }
3.68
hadoop_BCFile_close
/** * Finishing reading the BCFile. Release all resources. */ @Override public void close() { // nothing to be done now }
3.68
flink_CopyOnWriteStateMap_handleChainedEntryCopyOnWrite
/** * Perform copy-on-write for entry chains. We iterate the (hopefully and probably) still cached * chain, replace all links up to the 'untilEntry', which we actually wanted to modify. */ private StateMapEntry<K, N, S> handleChainedEntryCopyOnWrite( StateMapEntry<K, N, S>[] tab, int mapIdx, StateMapEntry<K,...
3.68
hbase_BloomFilterChunk_createAnother
/** * Creates another similar Bloom filter. Does not copy the actual bits, and sets the new filter's * key count to zero. * @return a Bloom filter with the same configuration as this */ public BloomFilterChunk createAnother() { BloomFilterChunk bbf = new BloomFilterChunk(hashType, this.bloomType); bbf.byteSize ...
3.68
hadoop_ShadedProtobufHelper_getFixedByteString
/** * Get the ByteString for frequently used fixed and small set strings. * @param key string * @return ByteString for frequently used fixed and small set strings. */ public static ByteString getFixedByteString(String key) { ByteString value = FIXED_BYTESTRING_CACHE.get(key); if (value == null) { value = By...
3.68
hbase_HDFSBlocksDistribution_addHostsAndBlockWeight
/** * add some weight to a list of hosts, update the value of unique block weight * @param hosts the list of the host * @param weight the weight */ public void addHostsAndBlockWeight(String[] hosts, long weight, StorageType[] storageTypes) { if (hosts == null || hosts.length == 0) { // erroneous data ret...
3.68
hbase_LoadBalancer_updateBalancerLoadInfo
/** * In some scenarios, Balancer needs to update internal status or information according to the * current tables load * @param loadOfAllTable region load of servers for all table */ default void updateBalancerLoadInfo(Map<TableName, Map<ServerName, List<RegionInfo>>> loadOfAllTable) { }
3.68
graphhopper_VectorTile_addKeysBytes
/** * <pre> * Dictionary encoding for keys * </pre> * * <code>repeated string keys = 3;</code> */ public Builder addKeysBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); ...
3.68
flink_InternalWindowProcessFunction_cleanupTime
/** * Returns the cleanup time for a window, which is {@code window.maxTimestamp + * allowedLateness}. In case this leads to a value greated than {@link Long#MAX_VALUE} then a * cleanup time of {@link Long#MAX_VALUE} is returned. * * @param window the window whose cleanup time we are computing. */ private long cl...
3.68
flink_BlockInfo_setAccumulatedRecordCount
/** * Sets the accumulatedRecordCount to the specified value. * * @param accumulatedRecordCount the accumulatedRecordCount to set */ public void setAccumulatedRecordCount(long accumulatedRecordCount) { this.accumulatedRecordCount = accumulatedRecordCount; }
3.68
flink_KeyGroupsStateHandle_getDelegateStateHandle
/** @return The handle to the actual states */ public StreamStateHandle getDelegateStateHandle() { return stateHandle; }
3.68
morf_H2Dialect_getSqlForDateToYyyymmdd
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForDateToYyyymmdd(org.alfasoftware.morf.sql.element.Function) */ @Override protected String getSqlForDateToYyyymmdd(Function function) { String sqlExpression = getSqlFrom(function.getArguments().get(0)); return String.format("CAST(SUBSTRING(%1$s, 1, 4)||SUBST...
3.68
hbase_QuotaFilter_getTableFilter
/** Returns the Table filter regex */ public String getTableFilter() { return tableRegex; }
3.68
hbase_Interns_tag
/** * Get a metrics tag * @param name of the tag * @param description of the tag * @param value of the tag * @return an interned metrics tag */ public static MetricsTag tag(String name, String description, String value) { return tag(info(name, description), value); }
3.68
hadoop_AllocationFileParser_getReservationPlanner
// Reservation global configuration knobs public Optional<String> getReservationPlanner() { return getTextValue(RESERVATION_PLANNER); }
3.68
framework_IndexedContainer_toString
/** * Gets the <code>String</code> representation of the contents of the * Item. The format of the string is a space separated catenation of the * <code>String</code> representations of the values of the Properties * contained by the Item. * * @return <code>String</code> representation of the Item contents */ @O...
3.68
morf_HumanReadableStatementHelper_generateRenameIndexString
/** * Generates a human-readable "Rename Index" string. * * @param tableName the name of the table to rename the index on * @param fromIndexName the original index name * @param toIndexName the replacement name for the index * @return a string containing the human-readable version of the action */ public static ...
3.68
hadoop_ContainerUpdates_getIncreaseRequests
/** * Returns Container Increase Requests. * @return Container Increase Requests. */ public List<UpdateContainerRequest> getIncreaseRequests() { return increaseRequests; }
3.68
framework_VMenuBar_getNavigationDownKey
/** * Get the key that moves the selection downwards. By default it is the down * arrow key but by overriding this you can change the key to whatever you * want. * * @return The keycode of the key */ protected int getNavigationDownKey() { return KeyCodes.KEY_DOWN; }
3.68
hibernate-validator_DefaultScriptEvaluatorFactory_run
/** * Runs the given privileged action, using a privileged block if required. * <p> * <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary * privileged actions within HV's protection domain. */ @IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in...
3.68
hbase_TableBackupClient_obtainBackupMetaDataStr
/** * Get backup request meta data dir as string. * @param backupInfo backup info * @return meta data dir */ protected String obtainBackupMetaDataStr(BackupInfo backupInfo) { StringBuilder sb = new StringBuilder(); sb.append("type=" + backupInfo.getType() + ",tablelist="); for (TableName table : backupInfo.ge...
3.68
hadoop_AzureBlobFileSystem_listLocatedStatus
/** * Incremental listing of located status entries, * preserving etags. * @param path path to list * @param filter a path filter * @return iterator of results. * @throws FileNotFoundException source path not found. * @throws IOException other values. */ @Override protected RemoteIterator<LocatedFileStatus> lis...
3.68
framework_VTabsheet_focusTabAtIndex
/** * Focus the specified tab. Make sure to call this only from user * events, otherwise will break things. * * @param tabIndex * the index of the tab to set. */ void focusTabAtIndex(int tabIndex) { Tab tabToFocus = tb.getTab(tabIndex); if (tabToFocus != null) { tabToFocus.focus(); ...
3.68
hbase_EntityLock_await
/** * @param timeout in milliseconds. If set to 0, waits indefinitely. * @return true if lock was acquired; and false if waiting time elapsed before lock could be * acquired. */ public boolean await(long timeout, TimeUnit timeUnit) throws InterruptedException { final boolean result = latch.await(timeout, ...
3.68
hbase_AbstractFSWALProvider_getArchivedWALFiles
/** * List all the old wal files for a dead region server. * <p/> * Initially added for supporting replication, where we need to get the wal files to replicate for * a dead region server. */ public static List<Path> getArchivedWALFiles(Configuration conf, ServerName serverName, String logPrefix) throws IOExcepti...
3.68
hadoop_ExitUtil_getFirstHaltException
/** * @return the first {@code HaltException} thrown, null if none thrown yet. */ public static HaltException getFirstHaltException() { return FIRST_HALT_EXCEPTION.get(); }
3.68
hudi_HoodieGlobalSimpleIndex_tagLocationInternal
/** * Tags records location for incoming records. * * @param inputRecords {@link HoodieData} of incoming records * @param context instance of {@link HoodieEngineContext} to use * @param hoodieTable instance of {@link HoodieTable} to use * @return {@link HoodieData} of records with record locations set */ @...
3.68
hadoop_FederationMembershipStateStoreInputValidator_checkAddress
/** * Validate if the SubCluster Address is a valid URL or not. * * @param address the endpoint of the subcluster to be verified * @throws FederationStateStoreInvalidInputException if the address is invalid */ private static void checkAddress(String address) throws FederationStateStoreInvalidInputException { ...
3.68
hudi_CleanerUtils_convertToHoodieCleanFileInfoList
/** * Convert list of cleanFileInfo instances to list of avro-generated HoodieCleanFileInfo instances. * @param cleanFileInfoList * @return */ public static List<HoodieCleanFileInfo> convertToHoodieCleanFileInfoList(List<CleanFileInfo> cleanFileInfoList) { return cleanFileInfoList.stream().map(CleanFileInfo::toHo...
3.68
pulsar_AbstractHdfsConnector_getFileSystem
/** * This exists in order to allow unit tests to override it so that they don't take several * minutes waiting for UDP packets to be received. * * @param config * the configuration to use * @return the FileSystem that is created for the given Configuration * @throws IOException * if unab...
3.68
hbase_BufferedMutatorParams_listener
/** * Override the default error handler. Default handler simply rethrows the exception. */ public BufferedMutatorParams listener(BufferedMutator.ExceptionListener listener) { this.listener = listener; return this; }
3.68
hudi_DirectMarkerTransactionManager_createUpdatedLockProps
/** * Rebuilds lock related configs. Only support ZK related lock for now. * * @param writeConfig Hudi write configs. * @param partitionPath Relative partition path. * @param fileId File ID. * @return Updated lock related configs. */ private static TypedProperties createUpdatedLockProps( HoodieWrite...
3.68
flink_Predicates_arePublicStaticFinalOfTypeWithAnnotation
/** * Tests that the field is {@code public static final}, has the fully qualified type name of * {@code fqClassName} and is annotated with the {@code annotationType}. */ public static DescribedPredicate<JavaField> arePublicStaticFinalOfTypeWithAnnotation( String fqClassName, Class<? extends Annotation> anno...
3.68
hadoop_SampleQuantiles_compress
/** * Try to remove extraneous items from the set of sampled items. This checks * if an item is unnecessary based on the desired error bounds, and merges it * with the adjacent item if it is. */ private void compress() { if (samples.size() < 2) { return; } ListIterator<SampleItem> it = samples.listIterat...
3.68
flink_Tuple22_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) { if (this == o) { return true; } if (!(o instanceof Tuple22)) { return false; } ...
3.68
hudi_BaseHoodieWriteClient_scheduleCleaningAtInstant
/** * Schedules a new cleaning instant with passed-in instant time. * @param instantTime cleaning Instant Time * @param extraMetadata Extra Metadata to be stored */ protected boolean scheduleCleaningAtInstant(String instantTime, Option<Map<String, String>> extraMetadata) throws HoodieIOException { return schedule...
3.68
flink_WriteSinkFunction_cleanFile
/** * Creates target file if it does not exist, cleans it if it exists. * * @param path is the path to the location where the tuples are written */ protected void cleanFile(String path) { try { PrintWriter writer; writer = new PrintWriter(path); writer.print(""); writer.close(); ...
3.68
hadoop_Utils_writeString
/** * Write a String as a VInt n, followed by n Bytes as in Text format. * * @param out out. * @param s s. * @throws IOException raised on errors performing I/O. */ public static void writeString(DataOutput out, String s) throws IOException { if (s != null) { Text text = new Text(s); byte[] buffer = te...
3.68
hbase_CompactSplit_onConfigurationChange
/** * {@inheritDoc} */ @Override public void onConfigurationChange(Configuration newConf) { // Check if number of large / small compaction threads has changed, and then // adjust the core pool size of the thread pools, by using the // setCorePoolSize() method. According to the javadocs, it is safe to // chang...
3.68
flink_TumbleWithSizeOnTime_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 TumbleWithSizeOnTimeWithAlias ...
3.68
hbase_RequestConverter_buildIsMasterRunningRequest
/** * Creates a protocol buffer IsMasterRunningRequest * @return a IsMasterRunningRequest */ public static IsMasterRunningRequest buildIsMasterRunningRequest() { return IsMasterRunningRequest.newBuilder().build(); }
3.68
framework_MinimalWidthColumns_setup
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. * VaadinRequest) */ @Override protected void setup(VaadinRequest request) { TreeTable tt = new TreeTable(); tt.addContainerProperty("Foo", String.class, ""); tt.addContainerProperty("Bar", String.class, "");...
3.68