name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_OBSFileSystem_getSchemeStatistics
/** * Return the {@link Statistics} instance used by this filesystem. * * @return the used {@link Statistics} instance */ Statistics getSchemeStatistics() { return statistics; }
3.68
hadoop_Endpoint_validate
/** * Validate the record by checking for null fields and other invalid * conditions * @throws NullPointerException if a field is null when it * MUST be set. * @throws RuntimeException on invalid entries */ public void validate() { Preconditions.checkNotNull(api, "null API field"); Preconditions.checkNotNull(...
3.68
hudi_HFileBootstrapIndex_close
/** * Close Writer Handles. */ public void close() { try { if (!closed) { indexByPartitionWriter.close(); indexByFileIdWriter.close(); closed = true; } } catch (IOException ioe) { throw new HoodieIOException(ioe.getMessage(), ioe); } }
3.68
hbase_AuthUtil_getAuthChore
/** * Checks if security is enabled and if so, launches chore for refreshing kerberos ticket. * @param conf the hbase service configuration * @return a ScheduledChore for renewals, if needed, and null otherwise. * @deprecated Deprecated since 2.2.0, this method will be * {@link org.apache.yetus.audienc...
3.68
flink_TestcontainersSettings_getEnvVars
/** @return The environment variables. */ public Map<String, String> getEnvVars() { return envVars; }
3.68
hadoop_AwsStatisticsCollector_timing
/** * Process a timing. * @param collection metric collection * @param metric metric * @param durationConsumer consumer */ private void timing( MetricCollection collection, SdkMetric<Duration> metric, Consumer<Duration> durationConsumer) { collection .metricValues(metric) .forEach(v -> du...
3.68
morf_NamedParameterPreparedStatement_setObject
/** * Sets the value of a named object parameter. * * @param parameter the parameter metadata. * @param value the parameter value. * @return this, for method chaining * @exception SQLException if an error occurs when setting the parameter */ public NamedParameterPreparedStatement setObject(SqlParameter parameter...
3.68
hadoop_FederationPolicyInitializationContext_setSubClusterPolicyConfiguration
/** * Setter for the {@link SubClusterPolicyConfiguration}. * * @param fedPolicyConfiguration the {@link SubClusterPolicyConfiguration} to * be used for initialization. */ public void setSubClusterPolicyConfiguration( SubClusterPolicyConfiguration fedPolicyConfiguration) { this.federationPolicyConfi...
3.68
dubbo_LazyConnectExchangeClient_warning
/** * If {@link Constants.LAZY_REQUEST_WITH_WARNING_KEY} is configured, then warn once every 5000 invocations. */ private void warning() { if (requestWithWarning) { if (warningCount.get() % warningPeriod == 0) { logger.warn( PROTOCOL_FAILED_REQUEST, "", ...
3.68
hbase_ModifyRegionUtils_createRegions
/** * Create new set of regions on the specified file-system. NOTE: that you should add the regions * to hbase:meta after this operation. * @param exec Thread Pool Executor * @param conf {@link Configuration} * @param rootDir Root directory for HBase instance * @param tableDescriptor...
3.68
flink_ParquetAvroWriters_forSpecificRecord
/** * Creates a ParquetWriterFactory for an Avro specific type. The Parquet writers will use the * schema of that specific type to build and write the columnar data. * * @param type The class of the type to write. */ public static <T extends SpecificRecordBase> ParquetWriterFactory<T> forSpecificRecord( Cl...
3.68
framework_AbstractBasicCrud_setup
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. * VaadinRequest) */ @Override protected void setup(VaadinRequest request) { getLayout().setSizeFull(); getLayout().setSpacing(true); getContent().setSizeFull(); form = new CustomForm(); formType = n...
3.68
zxing_QRCodeReader_decode
/** * Locates and decodes a QR code in an image. * * @return a String representing the content encoded by the QR code * @throws NotFoundException if a QR code cannot be found * @throws FormatException if a QR code cannot be decoded * @throws ChecksumException if error correction fails */ @Override public Result ...
3.68
querydsl_PathBuilder_getEnum
/** * Create a new Enum path * * @param <A> * @param property property name * @param type property type * @return property path */ public <A extends Enum<A>> EnumPath<A> getEnum(String property, Class<A> type) { validate(property, type); return super.createEnum(property, type); }
3.68
framework_TreeGrid_withPropertySet
/** * Creates a {@code TreeGrid} using a custom {@link PropertySet} * implementation for creating a default set of columns and for resolving * property names with {@link #addColumn(String)} and * {@link Column#setEditorComponent(HasValue)}. * <p> * This functionality is provided as static method instead of as a p...
3.68
druid_FnvHash_hashCode64
/** * normalized and lower and fnv1a_64_hash * * @param owner * @param name * @return */ public static long hashCode64(String owner, String name) { long hashCode = BASIC; if (owner != null) { String item = owner; boolean quote = false; int len = item.length(); if (len > ...
3.68
hadoop_Server_getConfigDir
/** * Returns the server config dir. * * @return the server config dir. */ public String getConfigDir() { return configDir; }
3.68
hbase_RatioBasedCompactionPolicy_shouldPerformMajorCompaction
/* * @param filesToCompact Files to compact. Can be null. * @return True if we should run a major compaction. */ @Override public boolean shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) throws IOException { boolean result = false; long mcTime = getNextMajorCompactTime(filesToCompact); if ...
3.68
hbase_ConnectionCache_getClusterId
/** Returns Cluster ID for the HBase cluster or null if there is an err making the connection. */ public String getClusterId() { try { ConnectionInfo connInfo = getCurrentConnection(); return connInfo.connection.getClusterId(); } catch (IOException e) { LOG.error("Error getting connection: ", e); } ...
3.68
flink_FileRegionWriteReadUtils_allocateAndConfigureBuffer
/** * Allocate a buffer with specific size and configure it to native order. * * @param bufferSize the size of buffer to allocate. * @return a native order buffer with expected size. */ public static ByteBuffer allocateAndConfigureBuffer(int bufferSize) { ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSiz...
3.68
flink_SortUtil_putFloatNormalizedKey
/** See http://stereopsis.com/radix.html for more details. */ public static void putFloatNormalizedKey( float value, MemorySegment target, int offset, int numBytes) { int iValue = Float.floatToIntBits(value); iValue ^= ((iValue >> (Integer.SIZE - 1)) | Integer.MIN_VALUE); NormalizedKeyUtil.putUnsign...
3.68
framework_VCalendar_getEventMovedListener
/** * Get the listener that listens to when event is dragged to a new location. * * @return */ public EventMovedListener getEventMovedListener() { return eventMovedListener; }
3.68
zxing_State_isBetterThanOrEqualTo
// Returns true if "this" state is better (or equal) to be in than "that" // state under all possible circumstances. boolean isBetterThanOrEqualTo(State other) { int newModeBitCount = this.bitCount + (HighLevelEncoder.LATCH_TABLE[this.mode][other.mode] >> 16); if (this.binaryShiftByteCount < other.binaryShiftByteCo...
3.68
hbase_RawCell_getTags
/** * Creates a list of tags in the current cell * @return a list of tags */ default Iterator<Tag> getTags() { return PrivateCellUtil.tagsIterator(this); }
3.68
zxing_PDF417_setCompaction
/** * @param compaction compaction mode to use */ public void setCompaction(Compaction compaction) { this.compaction = compaction; }
3.68
hudi_HoodieCatalogUtil_getOrderedPartitionValues
/** * Returns a list of ordered partition values by re-arranging them based on the given list of * partition keys. If the partition value is null, it'll be converted into default partition * name. * * @param partitionSpec The partition spec * @param partitionKeys The partition keys * @param tablePath The tab...
3.68
hbase_HStoreFile_getFileInfo
/** * @return the StoreFile object associated to this StoreFile. null if the StoreFile is not a * reference. */ public StoreFileInfo getFileInfo() { return this.fileInfo; }
3.68
pulsar_SchemaData_toSchemaInfo
/** * Convert a schema data to a schema info. * * @return the converted schema info. */ public SchemaInfo toSchemaInfo() { return SchemaInfo.builder() .name("") .type(type) .schema(data) .properties(props) .build(); }
3.68
hbase_Result_getNoVersionMap
/** * Map of families to their most recent qualifiers and values. * <p> * Returns a two level Map of the form: <code>Map&amp;family,Map&lt;qualifier,value&gt;&gt;</code> * <p> * The most recent version of each qualifier will be used. * @return map from families to qualifiers and value */ public NavigableMap<byte...
3.68
hadoop_NativeTaskOutputFiles_getSpillFileForWrite
/** * Create a local map spill file name. * * @param spillNumber the number * @param size the size of the file */ public Path getSpillFileForWrite(int spillNumber, long size) throws IOException { String path = String.format(SPILL_FILE_FORMAT_STRING, id, TASKTRACKER_OUTPUT, spillNumber); return lDirAlloc.getLo...
3.68
hbase_QuotaTableUtil_createPutForSpaceSnapshot
/** * Creates a {@link Put} to store the given {@code snapshot} for the given {@code tableName} in * the quota table. */ static Put createPutForSpaceSnapshot(TableName tableName, SpaceQuotaSnapshot snapshot) { Put p = new Put(getTableRowKey(tableName)); p.addColumn(QUOTA_FAMILY_USAGE, QUOTA_QUALIFIER_POLICY, ...
3.68
flink_PatternStream_process
/** * Applies a process function to the detected pattern sequence. For each pattern sequence the * provided {@link PatternProcessFunction} is called. In order to process timed out partial * matches as well one can use {@link TimedOutPartialMatchHandler} as additional interface. * * @param patternProcessFunction Th...
3.68
hadoop_NvidiaBinaryHelper_getGpuDeviceInformation
/** * @param pathOfGpuBinary The path of the binary * @return the GpuDeviceInformation parsed from the nvidia-smi output * @throws IOException if the binary output is not readable * @throws YarnException if the pathOfGpuBinary is null, * or the output parse failed */ synchronized GpuDeviceInformation getGpuDevice...
3.68
framework_AbstractOrderedLayout_setSpacing
/* * (non-Javadoc) * * @see com.vaadin.ui.Layout.SpacingHandler#setSpacing(boolean) */ @Override public void setSpacing(boolean spacing) { getState().spacing = spacing; }
3.68
hadoop_SchedulerHealth_getReservationCount
/** * Get the count of reservation from the latest scheduler health report. * * @return reservation count */ public Long getReservationCount() { return getOperationCount(Operation.RESERVATION); }
3.68
framework_ServerRpcQueue_connectorExists
/** * Checks if the connector with the given id is still ok to use (has not * been removed) * * @param connectorId * the connector id to check * @return true if the connector exists, false otherwise */ private boolean connectorExists(String connectorId) { ConnectorMap connectorMap = ConnectorMap.g...
3.68
hudi_HoodieWriteCommitKafkaCallback_validateKafkaConfig
/** * Validate whether both {@code ProducerConfig.BOOTSTRAP_SERVERS_CONFIG} and kafka topic are configured. * Exception will be thrown if anyone of them is not configured. */ private void validateKafkaConfig() { ValidationUtils.checkArgument(!StringUtils.isNullOrEmpty(bootstrapServers), String.format("Config %s ca...
3.68
hadoop_ReadWriteDiskValidatorMetrics_getFileReadQuantiles
/** * Get {@link MutableQuantiles} metrics for the file read time. * * @return {@link MutableQuantiles} metrics for the file read time */ @VisibleForTesting protected MutableQuantiles[] getFileReadQuantiles() { return fileReadQuantiles; }
3.68
hadoop_DynamicIOStatisticsBuilder_withMutableCounter
/** * Build a dynamic counter statistic from a * {@link MutableCounterLong}. * @param key key of this statistic * @param source mutable long counter * @return the builder. */ public DynamicIOStatisticsBuilder withMutableCounter(String key, MutableCounterLong source) { withLongFunctionCounter(key, s -> sourc...
3.68
flink_StreamExecutionEnvironment_areExplicitEnvironmentsAllowed
/** * Checks whether it is currently permitted to explicitly instantiate a LocalEnvironment or a * RemoteEnvironment. * * @return True, if it is possible to explicitly instantiate a LocalEnvironment or a * RemoteEnvironment, false otherwise. */ @Internal public static boolean areExplicitEnvironmentsAllowed() ...
3.68
streampipes_InfluxRequests_databaseExists
/** * Checks whether the given database exists. * * @param influxDb The InfluxDB client instance * @param dbName The name of the database, the method should look for * @return True if the database exists, false otherwise */ public static boolean databaseExists(InfluxDB influxDb, S...
3.68
zxing_PDF417ResultMetadata_getSegmentIndex
/** * The Segment ID represents the segment of the whole file distributed over different symbols. * * @return File segment index */ public int getSegmentIndex() { return segmentIndex; }
3.68
flink_ManuallyTriggeredScheduledExecutorService_triggerScheduledTasks
/** Triggers all registered tasks. */ public void triggerScheduledTasks() { triggerPeriodicScheduledTasks(); triggerNonPeriodicScheduledTasks(); }
3.68
morf_HumanReadableStatementHelper_generateCriterionValueString
/** * Generates a literal string from a value held in a {@link Criterion} object. The value might be a * either a standard Java type, such as {@link String} or {@link Double}, or a {@link FieldLiteral}. * * @param value the value to produce a string for. * @return the string. */ private static String generateCrit...
3.68
flink_StreamTask_disableInterruptOnCancel
/** * While we are outside the user code, we do not want to be interrupted further upon * cancellation. The shutdown logic below needs to make sure it does not issue calls that block * and stall shutdown. Additionally, the cancellation watch dog will issue a hard-cancel (kill * the TaskManager process) as a backup ...
3.68
hadoop_StageConfig_getJobAttemptDir
/** * Job attempt dir. */ public Path getJobAttemptDir() { return jobAttemptDir; }
3.68
AreaShop_AreaShop_reload
/** * Reload all files of the plugin and update all regions. */ public void reload() { reload(null); }
3.68
hbase_ZKUtil_checkExists
/** * Check if the specified node exists. Sets no watches. * @param zkw zk reference * @param znode path of node to watch * @return version of the node if it exists, -1 if does not exist * @throws KeeperException if unexpected zookeeper exception */ public static int checkExists(ZKWatcher zkw, String znode) thr...
3.68
framework_DesignContext_mapId
/** * Creates a mapping between the given global id and the component. Returns * true if globalId was already mapped to some component. Otherwise returns * false. Also sets the id of the component to globalId. * * If there is a mapping from the component to a global id (gid) different * from globalId, the mapping...
3.68
hudi_BinaryUtil_interleaving
/** * Interleaving array bytes. * Interleaving means take one bit from the first matrix element, one bit * from the next, etc, then take the second bit from the first matrix * element, second bit from the second, all the way to the last bit of the * last element. Combine those bits in that order into a single BigI...
3.68
framework_VAbstractCalendarPanel_getNextKey
/** * The key that selects the next week in the calendar. By default this is * the down arrow key but by overriding this method it can be changed to * whatever you like. * * @return the next week key */ protected int getNextKey() { return KeyCodes.KEY_DOWN; }
3.68
hadoop_TimelineEvents_getEntityType
/** * Get the entity type * * @return the entity type */ @XmlElement(name = "entitytype") public String getEntityType() { return entityType; }
3.68
framework_AbstractSelect_getContainerProperty
/** * Gets the Property identified by the given itemId and propertyId from the * Container. * * @see Container#getContainerProperty(Object, Object) */ @Override public Property getContainerProperty(Object itemId, Object propertyId) { return items.getContainerProperty(itemId, propertyId); }
3.68
open-banking-gateway_Xs2aConsentInfo_isDecoupledScaFailed
/** * Is decoupled SCA was failed (i.e. took too long) */ public boolean isDecoupledScaFailed(Xs2aContext ctx) { return false; // FIXME - check if authorization is taking too much time }
3.68
framework_AbstractComponent_getComponentError
/** * Gets the component's error message. * * @link Terminal.ErrorMessage#ErrorMessage(String, int) * * @return the component's error message. */ public ErrorMessage getComponentError() { return componentError; }
3.68
framework_ProgressBar_setInternalValue
/* * Overridden to keep the shared state in sync with the AbstractField * internal value. Should be removed once AbstractField is refactored to use * shared state. * * See tickets #10921 and #11064. */ @Override protected void setInternalValue(Float newValue) { super.setInternalValue(newValue); if (newVal...
3.68
hadoop_NamenodeStatusReport_getLifelineAddress
/** * Get the Lifeline RPC address. * * @return The Lifeline RPC address. */ public String getLifelineAddress() { return this.lifelineAddress; }
3.68
flink_UpsertTestSink_builder
/** * Create a {@link UpsertTestSinkBuilder} to construct a new {@link UpsertTestSink}. * * @param <IN> type of incoming records * @return {@link UpsertTestSinkBuilder} */ public static <IN> UpsertTestSinkBuilder<IN> builder() { return new UpsertTestSinkBuilder<>(); }
3.68
dubbo_TriHttp2RemoteFlowController_peek
/** * Returns the head of the pending queue, or {@code null} if empty. */ private FlowControlled peek() { return pendingWriteQueue.peek(); }
3.68
hadoop_OSSListRequest_isV1
/** * Is this a v1 API request or v2? * @return true if v1, false if v2 */ public boolean isV1() { return v1Request != null; }
3.68
hadoop_HttpReferrerAuditHeader_extractQueryParameters
/** * Split up the string. Uses httpClient: make sure it is on the classpath. * Any query param with a name but no value, e.g ?something is * returned in the map with an empty string as the value. * @param header URI to parse * @return a map of parameters. * @throws URISyntaxException failure to build URI from he...
3.68
framework_Page_getUri
/** * Get the new URI. * * @return the new uri */ public String getUri() { return uri; }
3.68
framework_VDebugWindow_applyPositionAndSize
/** * Applies the appropriate instance variables for width, height, x, y * depending on if the window is minimized or not. * * If the value is negative, the window is positioned that amount of pixels * from the right/bottom instead of left/top. * * Finally, the position is bounds-checked so that the window is no...
3.68
zxing_DataMatrixReader_decode
/** * Locates and decodes a Data Matrix code in an image. * * @return a String representing the content encoded by the Data Matrix code * @throws NotFoundException if a Data Matrix code cannot be found * @throws FormatException if a Data Matrix code cannot be decoded * @throws ChecksumException if error correctio...
3.68
hadoop_ApplicationReportSerDeser_toString
/** * Convert an instance to a JSON string -sync access to a shared ser/deser * object instance * @param instance object to convert * @return a JSON string description * @throws JsonProcessingException parse problems */ public static String toString(SerializedApplicationReport instance) throws JsonProcessingE...
3.68
morf_HumanReadableStatementProducer_removeTable
/** @see org.alfasoftware.morf.upgrade.SchemaEditor#removeTable(org.alfasoftware.morf.metadata.Table) **/ @Override public void removeTable(Table table) { consumer.schemaChange(HumanReadableStatementHelper.generateRemoveTableString(table)); }
3.68
dubbo_ReflectUtils_getDescWithoutMethodName
/** * get method desc. * "(I)I", "()V", "(Ljava/lang/String;Z)V". * * @param m method. * @return desc. */ public static String getDescWithoutMethodName(final CtMethod m) throws NotFoundException { StringBuilder ret = new StringBuilder(); ret.append('('); CtClass[] parameterTypes = m.getParameterTypes(...
3.68
framework_HierarchyMapper_hasChildren
/** * Returns whether given item has children. * * @param item * the node to test * @return {@code true} if node has children; {@code false} if not */ public boolean hasChildren(T item) { return getDataProvider().hasChildren(item); }
3.68
flink_StateTable_get
/** * Returns the state for the composite of active key and given namespace. This is typically used * by queryable state. * * @param key the key. Not null. * @param namespace the namespace. Not null. * @return the state of the mapping with the specified key/namespace composite key, or {@code * null} if no ma...
3.68
flink_PojoSerializerSnapshot_decomposeSubclassSerializerRegistry
/** * Transforms the subclass serializer registry structure, {@code LinkedHashMap<Class<?>, * TypeSerializer<?>>} to 2 separate structures: a map containing with registered classes as key * and their corresponding ids (order in the original map) as value, as well as a separate array * of the corresponding subclass ...
3.68
morf_SelectStatementBuilder_optimiseForRowCount
/** * If supported by the dialect, requests that the database arranges the query plan such that the * first <code>rowCount</code> rows are returned as fast as possible, even if the statistics * indicate that this means the full result set will take longer to be returned. * * <p>Note that this is <em>not</em> to be...
3.68
flink_InputGateMetrics_refreshAndGetAvg
/** * Iterates over all input channels and collects the average number of queued buffers in a * channel in a best-effort way. * * @return average number of queued buffers per channel */ float refreshAndGetAvg() { long total = 0; int count = 0; for (InputChannel channel : inputGate.getInputChannels().v...
3.68
hudi_HoodieTable_getCleanTimeline
/** * Get clean timeline. */ public HoodieTimeline getCleanTimeline() { return getActiveTimeline().getCleanerTimeline(); }
3.68
hbase_SubstringComparator_toByteArray
/** Returns The comparator serialized using pb */ @Override public byte[] toByteArray() { ComparatorProtos.SubstringComparator.Builder builder = ComparatorProtos.SubstringComparator.newBuilder(); builder.setSubstr(this.substr); return builder.build().toByteArray(); }
3.68
framework_VaadinFinderLocatorStrategy_getTags
/** * Gets the tags for server side class name. Also includes tags for older * components in v7 package. * * @param widgetName * the server side class name for widget * @return list of tags */ private List<Integer> getTags(String widgetName) { List<Integer> widgetTags = new ArrayList<>(); Arra...
3.68
pulsar_ManagedLedgerOfflineBacklog_getNumberOfEntries
// need a better way than to duplicate the functionality below from ML private long getNumberOfEntries(Range<PositionImpl> range, NavigableMap<Long, MLDataFormats.ManagedLedgerInfo.LedgerInfo> ledgers) { PositionImpl fromPosition = range.lowerEndpoint(); boolean fromIncluded = range.lowerBoundType() == ...
3.68
morf_DropViewListener_deregisterView
/** * * @param view View being de-registered. * @return List of sql statements. * @deprecated kept to ensure backwards compatibility. */ @Override @Deprecated public Iterable<String> deregisterView(View view) { return ImmutableList.of(); }
3.68
morf_OracleDialect_buildSQLToStartTracing
/** * @see org.alfasoftware.morf.jdbc.SqlDialect#buildSQLToStartTracing(java.lang.String) */ @Override public List<String> buildSQLToStartTracing(String identifier) { return Arrays.asList("ALTER SESSION SET tracefile_identifier = '" + identifier + "'","ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEV...
3.68
flink_ParquetColumnarRowSplitReader_createReadableVectors
/** * Create readable vectors from writable vectors. Especially for decimal, see {@link * ParquetDecimalVector}. */ private ColumnVector[] createReadableVectors() { ColumnVector[] vectors = new ColumnVector[writableVectors.length]; for (int i = 0; i < writableVectors.length; i++) { vectors[i] = ...
3.68
hadoop_CachedSASToken_get
/** * Gets the token if still valid. * @return the token or null if it is expired or near sasExpiry. */ public String get() { // quickly return null if not set if (sasToken == null) { return null; } String token; OffsetDateTime exp; synchronized (this) { token = sasToken; exp = sasExpiry; }...
3.68
hbase_RestCsrfPreventionFilter_handleHttpInteraction
/** * Handles an {@link HttpInteraction} by applying the filtering logic. * @param httpInteraction caller's HTTP interaction * @throws IOException if there is an I/O error * @throws ServletException if the implementation relies on the servlet API and a servlet API call * has failed *...
3.68
querydsl_JTSPointExpression_m
/** * The m-coordinate value for this Point, if it has one. Returns NIL otherwise. * * @return m-coordinate */ public NumberExpression<Double> m() { if (m == null) { m = Expressions.numberOperation(Double.class, SpatialOps.M, mixin); } return m; }
3.68
hadoop_ServiceRecord_addInternalEndpoint
/** * Add an internal endpoint * @param endpoint endpoint to set */ public void addInternalEndpoint(Endpoint endpoint) { Preconditions.checkArgument(endpoint != null); endpoint.validate(); internal.add(endpoint); }
3.68
framework_DropTargetExtension_getParent
/** * Returns the component this extension is attached to. * * @return Extended component. */ @Override @SuppressWarnings("unchecked") public T getParent() { return (T) super.getParent(); }
3.68
hbase_MasterObserver_preGetNamespaceDescriptor
/** * Called before a getNamespaceDescriptor request has been processed. * @param ctx the environment to interact with the framework and master * @param namespace the name of the namespace */ default void preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace) throws I...
3.68
dubbo_ThreadLocalCache_put
/** * API to store value against a key in the calling thread scope. * @param key Unique identifier for the object being store. * @param value Value getting store */ @Override public void put(Object key, Object value) { store.get().put(key, value); }
3.68
hbase_MasterObserver_postGetLocks
/** * Called after a getLocks request has been processed. * @param ctx the environment to interact with the framework and master * @throws IOException if something went wrong */ default void postGetLocks(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException { }
3.68
hadoop_FileIoProvider_nativeCopyFileUnbuffered
/** * See {@link Storage#nativeCopyFileUnbuffered(File, File, boolean)}. * * @param volume target volume. null if unavailable. * @param src an existing file to copy, must not be {@code null} * @param target the new file, must not be {@code null} * @param preserveFileDate true if the file date of the copy * ...
3.68
streampipes_TextBlock_getLabels
/** * Returns the labels associated to this TextBlock, or <code>null</code> if no such labels exist. * * NOTE: The returned instance is the one used directly in TextBlock. You have full access to the * data structure. However it is recommended to use the label-specific methods in * {@link TextBlock} whenever possi...
3.68
hbase_RegionStateStore_multiMutate
/** * Performs an atomic multi-mutate operation against the given table. Used by the likes of merge * and split as these want to make atomic mutations across multiple rows. */ private void multiMutate(RegionInfo ri, List<Mutation> mutations) throws IOException { debugLogMutations(mutations); byte[] row = Byt...
3.68
flink_KerberosUtils_getKrb5LoginModuleName
/* Return the Kerberos login module name */ public static String getKrb5LoginModuleName() { return System.getProperty("java.vendor").contains("IBM") ? "com.ibm.security.auth.module.Krb5LoginModule" : "com.sun.security.auth.module.Krb5LoginModule"; }
3.68
hudi_Pipelines_rowDataToHoodieRecord
/** * Transforms the row data to hoodie records. */ public static DataStream<HoodieRecord> rowDataToHoodieRecord(Configuration conf, RowType rowType, DataStream<RowData> dataStream) { return dataStream.map(RowDataToHoodieFunctions.create(rowType, conf), TypeInformation.of(HoodieRecord.class)) .setParallelism(...
3.68
flink_StreamSourceContexts_processAndEmitWatermark
/** This will only be called if allowWatermark returned {@code true}. */ @Override protected void processAndEmitWatermark(Watermark mark) { nextWatermarkTime = Long.MAX_VALUE; output.emitWatermark(mark); // we can shutdown the watermark timer now, no watermarks will be needed any more. // Note that thi...
3.68
hbase_BinaryComparator_areSerializedFieldsEqual
/** * Returns true if and only if the fields of the comparator that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(ByteArrayComparable other) { if (other == this) { return true; } if (!(other instanceof BinaryComparator)) { ...
3.68
hadoop_QuotaUsage_formatSize
/** * Formats a size to be human readable or in bytes. * @param size value to be formatted * @param humanReadable flag indicating human readable or not * @return String representation of the size */ private String formatSize(long size, boolean humanReadable) { return humanReadable ? StringUtils.TraditionalBin...
3.68
hmily_ExtensionLoader_load
/** * Load t. * * @param name the name * @param argsType the args type * @param args the args * @param loader the loader * @return the t */ public T load(final String name, final Class<?>[] argsType, final Object[] args, final ClassLoader loader) { return loadExtension(name, loader, argsType, args...
3.68
framework_RpcDataProviderExtension_internalDropItems
/** * Informs all DataGenerators than an item id has been dropped. * * @param droppedItemIds * collection of dropped item ids */ private void internalDropItems(Collection<Object> droppedItemIds) { for (Object itemId : droppedItemIds) { for (DataGenerator generator : dataGenerators) { ...
3.68
graphhopper_EdgeBasedWitnessPathSearcher_runSearch
/** * Runs a witness path search for a given target edge key. Results of previous searches (the shortest path tree) are * reused and the previous search is extended if necessary. Note that you need to call * {@link #initSearch(int, int, int, Stats)} before calling this method to initialize the search. * * @param t...
3.68
hbase_AbstractFSWAL_getLastTxid
// confirm non-empty before calling private static long getLastTxid(Deque<FSWALEntry> queue) { return queue.peekLast().getTxid(); }
3.68
framework_ProgressIndicator_setPollingInterval
/** * Sets the interval that component checks for progress. * * @param pollingInterval * the interval in milliseconds. */ public void setPollingInterval(int pollingInterval) { getState().pollingInterval = pollingInterval; }
3.68