name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_ActiveAuditManagerS3A_createSpan
/** * Start an operation; as well as invoking the audit * service to do this, sets the operation as the * active operation for this thread. * @param operation operation name. * @param path1 first path of operation * @param path2 second path of operation * @return a wrapped audit span * @throws IOException failu...
3.68
aws-saas-boost_KeycloakApi_toKeycloakUserNonExtensible
/* * This is not a preferred implementation, since Keycloak upgrades can lead to invisible bugs where * user attributes are silently dropped when during normal system-user-service operation due to their * not being properly set during upgrade operations. */ private static UserRepresentation toKeycloakUserNonExtensi...
3.68
flink_Dispatcher_getJobMasterGateway
/** Ensures that the JobMasterGateway is available. */ private CompletableFuture<JobMasterGateway> getJobMasterGateway(JobID jobId) { if (!jobManagerRunnerRegistry.isRegistered(jobId)) { return FutureUtils.completedExceptionally(new FlinkJobNotFoundException(jobId)); } final JobManagerRunner job = ...
3.68
framework_AbstractComponentConnector_delegateCaptionHandling
/* * (non-Javadoc) * * @see com.vaadin.client.ComponentConnector#delegateCaptionHandling () */ @Override public boolean delegateCaptionHandling() { return true; }
3.68
rocketmq-connect_ConnectUtil_currentOffsets
/** Get consumer group offset */ public static Map<MessageQueue, Long> currentOffsets(WorkerConfig config, String groupName, List<String> topics, Set<MessageQueue> messageQueues) { // Get consumer group offset DefaultMQAdminExt adminClient = null; try { adminClient = startMQAdminTool(config); ...
3.68
framework_HierarchicalDataCommunicator_expand
/** * Expands the given item at the given index. Calling this method will have * no effect if the item is already expanded. * * @param item * the item to expand * @param index * the index of the item */ public void expand(T item, Integer index) { doExpand(item, index, true); }
3.68
hibernate-validator_UUIDValidator_hasCorrectLetterCase
/** * Validates the letter case of the given character depending on the letter case parameter * * @param ch The letter to be tested * * @return {@code true} if the character is in the specified letter case or letter case is not specified */ private boolean hasCorrectLetterCase(char ch) { if ( letterCase == null ...
3.68
framework_DesignAttributeHandler_findSetterForAttribute
/** * Returns a setter that can be used for assigning the given design * attribute to the class * * @param clazz * the class that is scanned for setters * @param attribute * the design attribute to find setter for * @return the setter method or null if not found */ private static Method f...
3.68
mutate-test-kata_CompanyFixed_findEmployeeById
/** * Finds an employee by their id * @param id the id of the employee to be found * @return the employee with the id passed as the parameter or null if no such employee exists */ public EmployeeFixed findEmployeeById(String id) { return this.employees.stream() .filter(e -> e.getId().equals(id)) ...
3.68
dubbo_ReferenceConfigBase_determineInterfaceClass
/** * Determine the interface of the proxy class * * @param generic * @param interfaceName * @return */ public static Class<?> determineInterfaceClass(String generic, String interfaceName) { return determineInterfaceClass(generic, interfaceName, ClassUtils.getClassLoader()); }
3.68
dubbo_ReflectUtils_getName
/** * get constructor name. * "()", "(java.lang.String,int)" * * @param c constructor. * @return name. */ public static String getName(final Constructor<?> c) { StringBuilder ret = new StringBuilder("("); Class<?>[] parameterTypes = c.getParameterTypes(); for (int i = 0; i < parameterTypes.length; i++...
3.68
flink_AvgAggFunction_getValueExpression
/** If all input are nulls, count will be 0 and we will get null after the division. */ @Override public Expression getValueExpression() { Expression ifTrue = nullOf(getResultType()); Expression ifFalse = cast(div(sum, count), typeLiteral(getResultType())); return ifThenElse(equalTo(count, literal(0L)), ifT...
3.68
flink_BaseHybridHashTable_ensureNumBuffersReturned
/** * This method makes sure that at least a certain number of memory segments is in the list of * free segments. Free memory can be in the list of free segments, or in the return-queue where * segments used to write behind are put. The number of segments that are in that return-queue, * but are actually reclaimabl...
3.68
pulsar_BrokerService_updateDynamicServiceConfiguration
/** * Updates pulsar.ServiceConfiguration's dynamic field with value persistent into zk-dynamic path. It also validates * dynamic-value before updating it and throws {@code IllegalArgumentException} if validation fails */ private void updateDynamicServiceConfiguration() { Optional<Map<String, String>> configCach...
3.68
hbase_MetaTableLocator_setMetaLocation
/** * Sets the location of <code>hbase:meta</code> in ZooKeeper to the specified server address. * @param zookeeper reference to the {@link ZKWatcher} which also contains configuration and * operation * @param serverName the name of the server * @param replicaId the ID of the replica * @param ...
3.68
flink_MemoryBackendCheckpointStorageAccess_getMaxStateSize
/** Gets the size (in bytes) that a individual chunk of state may have at most. */ public int getMaxStateSize() { return maxStateSize; }
3.68
hadoop_ManifestCommitter_getTaskManifestPath
/** * The path to where the manifest file of a task attempt will be * saved when the task is committed. * This path will be the same for all attempts of the same task. * @param context the context of the task attempt. * @return the path where a task attempt should be stored. */ @VisibleForTesting public Path getT...
3.68
hadoop_FutureDataInputStreamBuilderImpl_initFromFS
/** * Initialize from a filesystem. */ private void initFromFS() { bufferSize = fileSystem.getConf().getInt(IO_FILE_BUFFER_SIZE_KEY, IO_FILE_BUFFER_SIZE_DEFAULT); }
3.68
framework_TableQuery_storeRowImmediately
/** * Inserts the given row in the database table immediately. Begins and * commits the transaction needed. This method was added specifically to * solve the problem of returning the final RowId immediately on the * SQLContainer.addItem() call when auto commit mode is enabled in the * SQLContainer. * * @param ro...
3.68
shardingsphere-elasticjob_JobScheduleController_parseTimeZoneString
/** * Get the TimeZone for the time zone specification. * * @param timeZoneString must start with "GMT", such as "GMT+8:00" * @return the specified TimeZone, or the GMT zone if the `timeZoneString` cannot be understood. */ private TimeZone parseTimeZoneString(final String timeZoneString) { if (Strings.isNullOr...
3.68
flink_DataStream_getOutput
/** * Returns an iterator over the collected elements. The returned iterator must only be used * once the job execution was triggered. * * <p>This method will always return the same iterator instance. * * @return iterator over collected elements */ public CloseableIterator<T> getOutput() { // we intentionall...
3.68
graphhopper_GHMRequest_putHint
// a good trick to serialize unknown properties into the HintsMap @JsonAnySetter public GHMRequest putHint(String fieldName, Object value) { hints.putObject(fieldName, value); return this; }
3.68
hadoop_ClusterMetrics_getMapSlotCapacity
/** * Get the total number of map slots in the cluster. * * @return map slot capacity */ public int getMapSlotCapacity() { return totalMapSlots; }
3.68
morf_SelectStatement_allowParallelDml
/** * Request that this query can contribute towards a parallel DML execution plan. * If a select statement is used within a DML statement, some dialects require DML parallelisation to be enabled via the select statement. * If the database implementation does not support, or is configured to disable parallel query e...
3.68
framework_SharedUtil_trimTrailingSlashes
/** * Trims trailing slashes (if any) from a string. * * @param value * The string value to be trimmed. Cannot be null. * @return String value without trailing slashes. */ public static String trimTrailingSlashes(String value) { return value.replaceAll("/*$", ""); }
3.68
framework_FileUploadHandler_getProgressEventInterval
/** * To prevent event storming, streaming progress events are sent in this * interval rather than every time the buffer is filled. This fixes #13155. * To adjust this value override the method, and register your own handler * in VaadinService.createRequestHandlers(). The default is 500ms, and * setting it to 0 ef...
3.68
flink_RetryPredicates_createExceptionTypePredicate
/** * Creates a predicate on given exception type. * * @param exceptionClass * @return predicate on exception type. */ public static ExceptionTypePredicate createExceptionTypePredicate( @Nonnull Class<? extends Throwable> exceptionClass) { return new ExceptionTypePredicate(exceptionClass); }
3.68
pulsar_BrokerService_startProtocolHandlers
// This call is used for starting additional protocol handlers public void startProtocolHandlers( Map<String, Map<InetSocketAddress, ChannelInitializer<SocketChannel>>> protocolHandlers) { protocolHandlers.forEach((protocol, initializers) -> { initializers.forEach((address, initializer) -> { ...
3.68
hbase_MiniHBaseCluster_shutdown
/** * Shut down the mini HBase cluster */ @Override public void shutdown() throws IOException { if (this.hbaseCluster != null) { this.hbaseCluster.shutdown(); } }
3.68
hbase_VisibilityLabelsCache_getGroupAuthsAsOrdinals
/** * Returns the list of ordinals of labels associated with the groups * @return the list of ordinals */ public Set<Integer> getGroupAuthsAsOrdinals(String[] groups) { this.lock.readLock().lock(); try { Set<Integer> authOrdinals = new HashSet<>(); if (groups != null && groups.length > 0) { Set<Int...
3.68
flink_TableResult_getTableSchema
/** * Returns the schema of the result. * * @deprecated This method has been deprecated as part of FLIP-164. {@link TableSchema} has been * replaced by two more dedicated classes {@link Schema} and {@link ResolvedSchema}. Use * {@link Schema} for declaration in APIs. {@link ResolvedSchema} is offered by th...
3.68
framework_TabSheetElement_openTab
/** * Opens the given tab by clicking its caption text or icon. If the tab has * neither text caption nor icon, clicks at a fixed position. * * @param tabCell * The tab to be opened. */ private void openTab(WebElement tabCell) { // Open the tab by clicking its caption text if it exists. List<We...
3.68
framework_Upload_addFailedListener
/** * Adds the upload interrupted event listener. * * @param listener * the Listener to be added, not null * @since 8.0 */ public Registration addFailedListener(FailedListener listener) { return addListener(FailedEvent.class, listener, UPLOAD_FAILED_METHOD); }
3.68
hbase_MobFile_open
/** * Opens the underlying reader. It's not thread-safe. Use MobFileCache.openFile() instead. */ public void open() throws IOException { sf.initReader(); }
3.68
graphhopper_GraphHopper_postProcessing
/** * Runs both after the import and when loading an existing Graph * * @param closeEarly release resources as early as possible */ protected void postProcessing(boolean closeEarly) { initLocationIndex(); importPublicTransit(); if (closeEarly) { boolean includesCustomProfiles = profilesByName.v...
3.68
hudi_BaseHoodieTableServiceClient_rollbackFailedWrites
/** * Rollback all failed writes. * * @return true if rollback was triggered. false otherwise. */ protected Boolean rollbackFailedWrites() { HoodieTable table = createTable(config, hadoopConf); List<String> instantsToRollback = getInstantsToRollback(table.getMetaClient(), config.getFailedWritesCleanPolicy(), Op...
3.68
streampipes_TreeUtils_findByDomId
/** * @param id the DOM ID * @param graphs list of invocation graphs * @return an invocation graph with a given DOM Id */ public static InvocableStreamPipesEntity findByDomId(String id, List<InvocableStreamPipesEntity> graphs) { for (InvocableStreamPipesEntity graph : graphs) { if (graph.getDom().equals(i...
3.68
morf_DirectoryDataSet_clearDestination
/** * @see org.alfasoftware.morf.xml.XmlStreamProvider.XmlOutputStreamProvider#clearDestination() */ @Override public void clearDestination() { for (File file : directory.listFiles()) { // skip files/folders that start with . such as .svn if (file.getName().startsWith(".")) continue; deleteFileOrDirect...
3.68
hibernate-validator_ConstrainedParameter_merge
/** * Creates a new constrained parameter object by merging this and the given * other parameter. * * @param other The parameter to merge. * * @return A merged parameter. */ public ConstrainedParameter merge(ConstrainedParameter other) { ConfigurationSource mergedSource = ConfigurationSource.max( source, other....
3.68
flink_FieldSet_toArray
/** * Transforms the field set into an array of field IDs. Whether the IDs are ordered or unordered * depends on the specific subclass of the field set. * * @return An array of all contained field IDs. */ public int[] toArray() { int[] a = new int[this.collection.size()]; int i = 0; for (int col : this...
3.68
framework_ConnectorTypeWriter_write
/** * Writes a JSON object containing connector-ID-to-type-ID mappings for each * dirty Connector in the given UI. * * @param ui * The {@link UI} containing dirty connectors * @param writer * The {@link Writer} used to write the JSON. * @param target * The paint target containi...
3.68
hadoop_PerGpuUtilizations_getOverallGpuUtilization
/** * Overall percent GPU utilization * @return utilization */ @XmlJavaTypeAdapter(PerGpuDeviceInformation.StrToFloatBeforeSpaceAdapter.class) @XmlElement(name = "gpu_util") public Float getOverallGpuUtilization() { return overallGpuUtilization; }
3.68
open-banking-gateway_ConsentAccessFactory_consentForAnonymousPsu
/** * Consent access for Anonymous PSU (does not require login to OBG)-ASPSP tuple. * @param aspsp ASPSP(bank) that grants consent * @param session Service session for this consent * @return New consent access template */ public ConsentAccess consentForAnonymousPsu(Fintech fintech, Bank aspsp, ServiceSession sessi...
3.68
rocketmq-connect_StateManagementService_persist
/** * Persist all the configs in a store. */ default void persist() { }
3.68
hbase_RegionHDFSBlockLocationFinder_scheduleFullRefresh
/** * Refresh all the region locations. * @return true if user created regions got refreshed. */ private boolean scheduleFullRefresh() { ClusterInfoProvider service = this.provider; // Protect from anything being null while starting up. if (service == null) { return false; } // TODO: Should this refre...
3.68
framework_AbstractDateField_convertFromDateString
/** * Parses string representation of date range limit into date type. * * @param temporalStr * the string representation * @return parsed value * @see AbstractDateFieldState#rangeStart * @see AbstractDateFieldState#rangeEnd * @since 8.4 */ protected T convertFromDateString(String temporalStr) { ...
3.68
hadoop_Cluster_cancelDelegationToken
/** * Cancel a delegation token from the JobTracker * @param token the token to cancel * @throws IOException * @deprecated Use {@link Token#cancel} instead */ public void cancelDelegationToken(Token<DelegationTokenIdentifier> token ) throws IOException, ...
3.68
pulsar_FunctionMetaDataManager_containsFunction
/** * Check if the function exists. * @param tenant tenant that the function belongs to * @param namespace namespace that the function belongs to * @param functionName name of function * @return true if function exists and false if it does not */ public synchronized boolean containsFunction(String tenant, String ...
3.68
flink_AbstractCollectResultBuffer_next
/** Get next user visible result, returns null if currently there is no more. */ public T next() { if (userVisibleHead == userVisibleTail) { return null; } T ret = buffer.removeFirst(); userVisibleHead++; sanityCheck(); return ret; }
3.68
hbase_ThriftHBaseServiceHandler_addScanner
/** * Assigns a unique ID to the scanner and adds the mapping to an internal HashMap. * @param scanner to add * @return Id for this Scanner */ private int addScanner(ResultScanner scanner) { int id = nextScannerId.getAndIncrement(); scannerMap.put(id, scanner); return id; }
3.68
flink_TieredStorageProducerClient_writeAccumulatedBuffer
/** * Write the accumulated buffer of this subpartitionId to an appropriate tier. After the tier is * decided, the buffer will be written to the selected tier. * * <p>Note that the method only throws an exception when choosing a storage tier, so the caller * should ensure that the buffer is recycled when throwing ...
3.68
hbase_MultiByteBuff_asSubByteBuffer
/** * Returns bytes from given offset till length specified, as a single ByteBuffer. When all these * bytes happen to be in a single ByteBuffer, which this object wraps, that ByteBuffer item as * such will be returned (with offset in this ByteBuffer where the bytes starts). So users are * warned not to change the p...
3.68
hadoop_RoleModel_add
/** * Add a single statement. * @param stat new statement. */ public void add(Statement stat) { statement.add(stat); }
3.68
hbase_FileSystemUtilizationChore_getRegionSizeStore
// visible for testing RegionSizeStore getRegionSizeStore() { return rs.getRegionServerSpaceQuotaManager().getRegionSizeStore(); }
3.68
flink_OptimizerNode_getBroadcastConnections
/** Return the list of inputs associated with broadcast variables for this node. */ public List<DagConnection> getBroadcastConnections() { return this.broadcastConnections; }
3.68
streampipes_DataStreamResourceManager_update
/** * Takes a data stream {@link SpDataStream} as an input updates it in the database */ public void update(SpDataStream dataStream) { db.updateElement(dataStream); }
3.68
hbase_KeyValueUtil_createLastOnRow
/** * Creates a KeyValue that is last on the specified row id. That is, every other possible KeyValue * for the given row would compareTo() less than the result of this call. * @param row row key * @return Last possible KeyValue on passed <code>row</code> */ public static KeyValue createLastOnRow(final byte[] row)...
3.68
morf_HumanReadableStatementProducer_produceFor
/** * Produces output via the supplied consumer. * * @param consumer the consumer to consume the events. */ public void produceFor(final HumanReadableStatementConsumer consumer) { // Ensure the upgrade steps are in the correct order final Collection<Class<? extends UpgradeStep>> upgradeSteps = upgradeGraph.ord...
3.68
graphhopper_VectorTile_setType
/** * <pre> * The type of geometry stored in this feature. * </pre> * * <code>optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN];</code> */ public Builder setType(vector_tile.VectorTile.Tile.GeomType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004...
3.68
hbase_RootProcedureState_release
/** * Called by the ProcedureExecutor to mark the procedure step as finished. */ protected synchronized void release(Procedure<TEnvironment> proc) { running--; }
3.68
flink_StreamProjection_projectTuple7
/** * Projects a {@link Tuple} {@link DataStream} to the previously selected fields. * * @return The projected DataStream. * @see Tuple * @see DataStream */ public <T0, T1, T2, T3, T4, T5, T6> SingleOutputStreamOperator<Tuple7<T0, T1, T2, T3, T4, T5, T6>> projectTuple7() { TypeInformation<?>[] fTypes ...
3.68
framework_DateCellDayEvent_getMinTimeRange
/** * @return the minimum amount of ms that an event must last when resized */ private long getMinTimeRange() { return DateConstants.MINUTEINMILLIS * 30; }
3.68
hmily_DeleteStatementAssembler_assembleHmilyDeleteStatement
/** * Assemble Hmily delete statement. * * @param deleteStatement delete statement * @param hmilyDeleteStatement hmily delete statement * @return hmily delete statement */ public static HmilyDeleteStatement assembleHmilyDeleteStatement(final DeleteStatement deleteStatement, final HmilyDeleteStatement hmilyDeleteS...
3.68
flink_SingleOutputStreamOperator_setUidHash
/** * Sets an user provided hash for this operator. This will be used AS IS the create the * JobVertexID. * * <p>The user provided hash is an alternative to the generated hashes, that is considered when * identifying an operator through the default hash mechanics fails (e.g. because of changes * between Flink ver...
3.68
framework_ComboBox_getFirstItemIndexOnCurrentPage
/** * Returns the index of the first item on the current page. The index is to * the underlying (possibly filtered) contents. The null item, if any, does * not have an index but takes up a slot on the first page. * * @param needNullSelectOption * true if a null option should be shown before any other o...
3.68
hbase_MasterRpcServices_switchSnapshotCleanup
/** * Turn on/off snapshot auto-cleanup based on TTL * @param enabledNewVal Set to <code>true</code> to enable, <code>false</code> to disable * @param synchronous If <code>true</code>, it waits until current snapshot cleanup is * completed, if outstanding * @return previous snapshot auto-cle...
3.68
flink_FromClasspathEntryClassInformationProvider_createFromClasspath
/** * Creates a {@code FromClasspathEntryClassInformationProvider} looking for the entry class * providing the main method on the passed classpath. * * @param classpath The classpath the job class is expected to be part of. * @return The {@code FromClasspathEntryClassInformationProvider} providing the job class fo...
3.68
morf_DataValueLookup_getString
/** * Gets the value as a string. Intended to allow the record to be easily serialised. * Always succeeds, and uses the following conversions from the underlying type: * * <dl> * <dt>BigDecimal</dt><dd>Uses {@link BigDecimal#toPlainString()}</dd> * <dt>Byte Array</dt><dd>Converted to a MIME Base 64 string</dd> ...
3.68
hadoop_ClientMmap_close
/** * Close the ClientMmap object. */ @Override public void close() { if (replica != null) { if (anchored) { replica.removeNoChecksumAnchor(); } replica.unref(); } replica = null; }
3.68
hmily_DateUtils_parseLocalDateTime
/** * parseLocalDateTime. * out put format:yyyy-MM-dd HH:mm:ss * * @param str date String * @return yyyy-MM-dd HH:mm:ss * @see LocalDateTime */ private static LocalDateTime parseLocalDateTime(final String str) { return LocalDateTime.parse(str, DateTimeFormatter.ofPattern(DATE_FORMAT_DATETIME)); }
3.68
flink_SqlFunctionUtils_initcap
/** SQL INITCAP(string) function. */ public static String initcap(String s) { // Assumes Alpha as [A-Za-z0-9] // white space is treated as everything else. final int len = s.length(); boolean start = true; final StringBuilder newS = new StringBuilder(); for (int i = 0; i < len; i++) { c...
3.68
hadoop_JsonSerialization_save
/** * Save to a Hadoop filesystem. * @param fs filesystem * @param path path * @param overwrite should any existing file be overwritten * @param instance instance * @throws IOException IO exception. */ public void save(FileSystem fs, Path path, T instance, boolean overwrite) throws IOException { writeJ...
3.68
hbase_StructBuilder_reset
/** * Reset the sequence of accumulated fields. */ public StructBuilder reset() { fields.clear(); return this; }
3.68
hbase_ServerManager_getDrainingServersList
/** Returns A copy of the internal list of draining servers. */ public List<ServerName> getDrainingServersList() { return new ArrayList<>(this.drainingServers); }
3.68
framework_VTabsheetPanel_showWidget
/** * Shows the widget at the specified index. This causes the currently- * visible widget to be hidden. * * @param index * the index of the widget to be shown */ public void showWidget(int index) { checkIndexBoundsForAccess(index); Widget newVisible = getWidget(index); if (visibleWidget !=...
3.68
hbase_OrderedInt64_encodeLong
/** * Write instance {@code val} into buffer {@code dst}. * @param dst the {@link PositionedByteRange} to write to * @param val the value to write to {@code dst} * @return the number of bytes written */ public int encodeLong(PositionedByteRange dst, long val) { return OrderedBytes.encodeInt64(dst, val, order); }
3.68
flink_BufferFileChannelReader_readBufferFromFileChannel
/** * Reads data from the object's file channel into the given buffer. * * @param buffer the buffer to read into * @return whether the end of the file has been reached (<tt>true</tt>) or not (<tt>false</tt>) */ public boolean readBufferFromFileChannel(Buffer buffer) throws IOException { checkArgument(fileChann...
3.68
hbase_RemoteProcedureException_deserialize
/** * Takes a series of bytes and tries to generate an RemoteProcedureException instance for it. * @param bytes the bytes to generate the {@link RemoteProcedureException} from * @return the ForeignExcpetion instance * @throws IOException if there was deserialization problem this is thrown. */ public static RemoteP...
3.68
hadoop_AbfsInputStreamStatisticsImpl_seek
/** * Record a forward or backward seek, adding a seek operation, a forward or * a backward seek operation, and number of bytes skipped. * The seek direction will be calculated based on the parameters. * * @param seekTo seek to the position. * @param currentPos current position. */ @Override public void seek...
3.68
hadoop_ResourceRequest_clone
/** * Clone a ResourceRequest object (shallow copy). Please keep it loaded with * all (new) fields * * @param rr the object to copy from * @return the copied object */ @Public @Evolving public static ResourceRequest clone(ResourceRequest rr) { // Please keep it loaded with all (new) fields return ResourceRequ...
3.68
framework_PropertyDefinition_getTopLevelName
/** * Gets the top level name of this property. * * @return the top level property name, not <code>null</code> * @since 8.3 */ public default String getTopLevelName() { return getName(); }
3.68
morf_AbstractSqlDialectTest_testAddDays
/** * Test that AddDays functionality behaves as expected. */ @Test public void testAddDays() { String result = testDialect.getSqlFrom(addDays(field("testField"), new FieldLiteral(-20))); assertEquals(expectedAddDays(), result); }
3.68
hudi_DFSPropertiesConfiguration_addPropsFromStream
/** * Add properties from buffered reader. * * @param reader Buffered Reader * @throws IOException */ public void addPropsFromStream(BufferedReader reader, Path cfgFilePath) throws IOException { try { reader.lines().forEach(line -> { if (!isValidLine(line)) { return; } String[] spli...
3.68
hadoop_BufferedIOStatisticsOutputStream_hasCapability
/** * If the inner stream supports {@link StreamCapabilities}, * forward the probe to it. * Otherwise: return false. * * @param capability string to query the stream support for. * @return true if a capability is known to be supported. */ @Override public boolean hasCapability(final String capability) { if (ou...
3.68
hadoop_ClientThrottlingIntercept_sendingRequest
/** * Called before the Azure Storage SDK sends a request. Client-side throttling * uses this to suspend the request, if necessary, to minimize errors and * maximize throughput. * * @param event The connection, operation, and request state. */ public static void sendingRequest(SendingRequestEvent event) { BlobO...
3.68
hudi_ExpressionPredicates_bindPredicates
/** * Binds predicates to create an OR predicate. * * @param predicates The disjunctive predicates. * @return An OR predicate. */ public Predicate bindPredicates(Predicate... predicates) { this.predicates = predicates; return this; }
3.68
open-banking-gateway_PsuEncryptionServiceProvider_forPublicKey
/** * Public key (write only) encryption. * @param keyId Key ID * @param key Public key * @return Encryption service for writing only */ public EncryptionService forPublicKey(UUID keyId, PublicKey key) { return oper.encryptionService(keyId.toString(), key); }
3.68
morf_AddIndex_getTableName
/** * @return the name of the table to add the column to. */ public String getTableName() { return tableName; }
3.68
hadoop_NamenodeStatusReport_getState
/** * Get the state of the Namenode being monitored. * * @return State of the Namenode. */ public FederationNamenodeServiceState getState() { if (!registrationValid) { return FederationNamenodeServiceState.UNAVAILABLE; } else if (haStateValid) { return FederationNamenodeServiceState.getState(status); ...
3.68
hbase_AsyncTable_toRow
/** * Specify a stop row * @param endKey select regions up to and including the region containing this row, exclusive. */ default CoprocessorServiceBuilder<S, R> toRow(byte[] endKey) { return toRow(endKey, false); }
3.68
flink_MailboxMetricsController_isLatencyMeasurementSetup
/** * Indicates if latency measurement has been setup. * * @return True if latency measurement has been setup. */ public boolean isLatencyMeasurementSetup() { return this.timerService != null && this.mailboxExecutor != null; }
3.68
hbase_DateTieredCompactionPolicy_getCompactionBoundariesForMinor
/** * Returns a list of boundaries for multiple compaction output from minTimestamp to maxTimestamp. */ private static List<Long> getCompactionBoundariesForMinor(CompactionWindow window, boolean singleOutput) { List<Long> boundaries = new ArrayList<>(); boundaries.add(Long.MIN_VALUE); if (!singleOutput) { ...
3.68
hbase_StorageClusterStatusModel_getTotalStaticBloomSizeKB
/** Returns The total size of static bloom, in KB */ @XmlAttribute public int getTotalStaticBloomSizeKB() { return totalStaticBloomSizeKB; }
3.68
flink_ExceptionUtils_isJvmFatalError
/** * Checks whether the given exception indicates a situation that may leave the JVM in a * corrupted state, meaning a state where continued normal operation can only be guaranteed via * clean process restart. * * <p>Currently considered fatal exceptions are Virtual Machine errors indicating that the JVM * is co...
3.68
streampipes_EpProperties_listEp
/** * Creates a new list-based event property of the parameter type eventProperty * * @param label A human-readable label of the property * @param runtimeName The field identifier of the event property at runtime. * @param eventProperty The complex type of data in the list * @return {@link org.apache.st...
3.68
flink_AvroWriters_forSpecificRecord
/** * Creates an {@link AvroWriterFactory} for an Avro specific type. The Avro writers will use the * schema of that specific type to build and write the records. * * @param type The class of the type to write. */ public static <T extends SpecificRecordBase> AvroWriterFactory<T> forSpecificRecord( Class<T>...
3.68
morf_MathsField_getRightField
/** * @return the rightField */ public AliasedField getRightField() { return rightField; }
3.68
hmily_SQLImageMapperFactory_newInstance
/** * Create new instance of SQL image mapper. * * @param sqlTuple SQL tuple * @return SQL image mapper */ public static SQLImageMapper newInstance(final HmilySQLTuple sqlTuple) { switch (sqlTuple.getManipulationType()) { case INSERT: return new InsertSQLImageMapper(sqlTuple.getTableName(),...
3.68
hbase_WALSplitUtil_getRecoveredHFilesDir
/** * @param regionDir This regions directory in the filesystem * @param familyName The column family name * @return The directory that holds recovered hfiles for the region's column family */ private static Path getRecoveredHFilesDir(final Path regionDir, String familyName) { return new Path(new Path(regionDir,...
3.68
hbase_Client_executePathOnly
/** * Execute a transaction method given only the path. Will select at random one of the members of * the supplied cluster definition and iterate through the list until a transaction can be * successfully completed. The definition of success here is a complete HTTP transaction, * irrespective of result code. * @pa...
3.68