name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_OrderedBytes_isNumeric
/** * Return true when the next encoded value in {@code src} uses Numeric encoding, false otherwise. * {@code NaN}, {@code +/-Inf} are valid Numeric values. */ public static boolean isNumeric(PositionedByteRange src) { byte x = (-1 == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek()); return...
3.68
hudi_BaseHoodieWriteClient_commit
/** * * Commit changes performed at the given instantTime marker. */ public boolean commit(String instantTime, O writeStatuses, Option<Map<String, String>> extraMetadata) { HoodieTableMetaClient metaClient = createMetaClient(false); String actionType = metaClient.getCommitActionType(); return commit(instantTim...
3.68
framework_LegacyLocatorStrategy_findParentWidget
/** * Returns the first widget found when going from {@code targetElement} * upwards in the DOM hierarchy, assuming that {@code ancestorWidget} is a * parent of {@code targetElement}. * * @param targetElement * @param ancestorWidget * @return The widget whose root element is a parent of * {@code targetE...
3.68
hmily_HmilySQLUtil_isReadOnly
/** * Determine whether SQL is read-only. * * @param sqlStatement SQL statement * @return true if read-only, otherwise false */ public static boolean isReadOnly(final HmilyStatement sqlStatement) { if (sqlStatement instanceof HmilyDMLStatement) { return isReadOnly((HmilyDMLStatement) sqlStatement); ...
3.68
dubbo_ConfigurationUtils_getGlobalConfiguration
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getGlobalConfiguration(ScopeModel)} */ @Deprecated public static Configuration getGlobalConfiguration() { return ApplicationModel.defaultModel().modelEnvironment().getConfiguration(); }
3.68
zxing_CameraManager_closeDriver
/** * Closes the camera driver if still in use. */ public synchronized void closeDriver() { if (camera != null) { camera.getCamera().release(); camera = null; // Make sure to clear these each time we close the camera, so that any scanning rect // requested by intent is forgotten. framingRect = n...
3.68
AreaShop_RentRegion_extend
/** * Try to extend the rent for the current owner, respecting all restrictions. * @return true if successful, otherwise false */ public boolean extend() { if(!isRented()) { return false; } OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(getRenter()); return offlinePlayer != null && rent(offlinePlayer);...
3.68
morf_ConnectionResourcesBean_getHostName
/** * @see org.alfasoftware.morf.jdbc.AbstractConnectionResources#getHostName() */ @Override public String getHostName() { return hostName; }
3.68
hudi_HoodieTable_isPartitioned
/** * @return if the table is physically partitioned, based on the partition fields stored in the table config. */ public boolean isPartitioned() { return getMetaClient().getTableConfig().isTablePartitioned(); }
3.68
flink_FromClasspathEntryClassInformationProvider_createFromSystemClasspath
/** * Creates a {@code FromClasspathEntryClassInformationProvider} looking for the entry class * providing the main method on the system classpath. * * @return The {@code FromClasspathEntryClassInformationProvider} providing the job class found * on the system classpath. * @throws IOException If some Jar list...
3.68
morf_OracleMetaDataProvider_expensiveReadTableKeys
/** * Read the tables, and the primary keys for the database. * * @return A map of table name to primary key(s). */ private Map<String, List<String>> expensiveReadTableKeys() { log.info("Starting read of key definitions"); long start = System.currentTimeMillis(); final StringBuilder primaryKeysWithWrongIndex...
3.68
flink_OpaqueMemoryResource_getResourceHandle
/** Gets the handle to the resource. */ public T getResourceHandle() { return resourceHandle; }
3.68
hbase_AccessController_getUserPermissions
/** * @deprecated since 2.2.0 and will be removed in 4.0.0. Use * {@link Admin#getUserPermissions(GetUserPermissionsRequest)} instead. * @see Admin#getUserPermissions(GetUserPermissionsRequest) * @see <a href="https://issues.apache.org/jira/browse/HBASE-21911">HBASE-21911</a> */ @Deprecated @Override p...
3.68
flink_AbstractID_toHexString
/** * Returns pure String representation of the ID in hexadecimal. This method should be used to * construct things like paths etc., that require a stable representation and is therefore * final. */ public final String toHexString() { if (this.hexString == null) { final byte[] ba = new byte[SIZE]; ...
3.68
hudi_DFSDeltaInputReader_analyzeSingleFile
/** * Implementation of {@link DeltaInputReader}s to provide a way to read a single file on DFS and provide an * average number of records across N files. */ protected long analyzeSingleFile(String filePath) { throw new UnsupportedOperationException("No implementation found"); }
3.68
hadoop_AddMountAttributes_updateCommonAttributes
/** * Common attributes like read-only, fault-tolerant, dest order, owner, group, mode etc are * updated for the given mount table object. * * @param existingEntry Mount table object. */ private void updateCommonAttributes(MountTable existingEntry) { if (this.isReadonly()) { existingEntry.setReadOnly(true); ...
3.68
starts_AnnotationVisitor_visitEnum
/** * Visits an enumeration value of the annotation. * * @param name * the value name. * @param desc * the class descriptor of the enumeration class. * @param value * the actual enumeration value. */ public void visitEnum(String name, String desc, String value) { if (av != ...
3.68
framework_SimpleStringFilter_getFilterString
/** * Returns the filter string. * * Note: this method is intended only for implementations of lazy string * filters and may change in the future. * * @return filter string given to the constructor */ public String getFilterString() { return filterString; }
3.68
flink_StateBackendLoader_loadStateBackendFromKeyedStateHandles
/** * Load state backend which may wrap the original state backend for recovery. * * @param originalStateBackend StateBackend loaded from application or config. * @param classLoader User code classloader. * @param keyedStateHandles The state handles for restore. * @return Wrapped state backend for recovery. * @t...
3.68
framework_BigDecimalTextField_getTicketNumber
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber() */ @Override protected Integer getTicketNumber() { return 9997; }
3.68
framework_ServerRpcHandler_parseInvocations
/** * Parse JSON from the client into a list of MethodInvocation instances. * * @param connectorTracker * The ConnectorTracker used to lookup connectors * @param invocationsJson * JSON containing all information needed to execute all * requested RPC calls. * @return list of Meth...
3.68
hbase_RSGroupAdminClient_addRSGroup
/** * Creates a new RegionServer group with the given name. */ public void addRSGroup(String groupName) throws IOException { AddRSGroupRequest request = AddRSGroupRequest.newBuilder().setRSGroupName(groupName).build(); try { stub.addRSGroup(null, request); } catch (ServiceException e) { throw ProtobufUt...
3.68
flink_ModuleManager_unloadModule
/** * Unload a module with given name. * * @param name name of the module * @throws ValidationException when there is no module with the given name */ public void unloadModule(String name) { if (loadedModules.containsKey(name)) { loadedModules.remove(name); boolean used = usedModules.remove(nam...
3.68
hadoop_TimelineEntities_addEntities
/** * All a list of entities into the existing entity list * * @param entities * a list of entities */ public void addEntities(List<TimelineEntity> entities) { this.entities.addAll(entities); }
3.68
hadoop_SaslParticipant_wrap
/** * Wraps a byte array. * * @param bytes The array containing the bytes to wrap. * @param off The starting position at the array * @param len The number of bytes to wrap * @return byte[] wrapped bytes * @throws SaslException if the bytes cannot be successfully wrapped */ public byte[] wrap(byte[] bytes, int o...
3.68
hudi_IncrSourceHelper_getHollowCommitHandleMode
/** * When hollow commits are found while using incremental source with {@link HoodieDeltaStreamer}, * unlike batch incremental query, we do not use {@link HollowCommitHandling#FAIL} by default, * instead we use {@link HollowCommitHandling#BLOCK} to block processing data from going beyond the * hollow commits to av...
3.68
hadoop_HdfsDataInputStream_getWrappedStream
/** * Get a reference to the wrapped output stream. We always want to return the * actual underlying InputStream, even when we're using a CryptoStream. e.g. * in the delegated methods below. * * @return the underlying output stream */ public InputStream getWrappedStream() { return in; }
3.68
framework_DDEventHandleStrategy_handleTouchEnd
/** * Called to handle {@link Event#ONTOUCHEND} event. * * @param target * target element over which DnD event has happened * @param event * ONTOUCHEND GWT event for active DnD operation * @param mediator * VDragAndDropManager data accessor */ protected void handleTouchEnd(Elem...
3.68
hadoop_OBSCommonUtils_initMultipartUploads
/** * initialize multi-part upload, purge larger than the value of * PURGE_EXISTING_MULTIPART_AGE. * * @param owner the owner OBSFileSystem instance * @param conf the configuration to use for the FS * @throws IOException on any failure to initialize multipart upload */ static void initMultipartUploads(final OBS...
3.68
hbase_ZKProcedureUtil_isAcquiredPathNode
/** * Is this in the procedure barrier acquired znode path */ boolean isAcquiredPathNode(String path) { return path.startsWith(this.acquiredZnode) && !path.equals(acquiredZnode) && isMemberNode(path, acquiredZnode); }
3.68
hadoop_SampleQuantiles_snapshot
/** * Get a snapshot of the current values of all the tracked quantiles. * * @return snapshot of the tracked quantiles. If no items are added * to the estimator, returns null. */ synchronized public Map<Quantile, Long> snapshot() { // flush the buffer first for best results insertBatch(); if (samples.isE...
3.68
hbase_CatalogFamilyFormat_getRegionStateColumn
/** * Returns the column qualifier for serialized region state * @param replicaId the replicaId of the region * @return a byte[] for state qualifier */ public static byte[] getRegionStateColumn(int replicaId) { return replicaId == 0 ? HConstants.STATE_QUALIFIER : Bytes.toBytes(HConstants.STATE_QUALIFIER_S...
3.68
hadoop_DatanodeAdminProperties_setAdminState
/** * Set the admin state of the datanode. * @param adminState the admin state of the datanode. */ public void setAdminState(final AdminStates adminState) { this.adminState = adminState; }
3.68
framework_CssLayoutConnector_onConnectorHierarchyChange
/* * (non-Javadoc) * * @see com.vaadin.client.ui.AbstractComponentContainerConnector# * onConnectorHierarchyChange * (com.vaadin.client.ConnectorHierarchyChangeEvent) */ @Override public void onConnectorHierarchyChange( ConnectorHierarchyChangeEvent event) { Profiler.enter("CssLayoutConnector.onConnec...
3.68
pulsar_AbstractDispatcherSingleActiveConsumer_pickAndScheduleActiveConsumer
/** * Pick active consumer for a topic for {@link SubType#Failover} subscription. * If it's a non-partitioned topic then it'll pick consumer based on order they subscribe to the topic. * If is's a partitioned topic, first sort consumers based on their priority level and consumer name then * distributed partitions e...
3.68
incubator-hugegraph-toolchain_PropertyKeyController_delete
/** * Should request "check_using" before delete */ @DeleteMapping public void delete(@PathVariable("connId") int connId, @RequestParam List<String> names, @RequestParam(name = "skip_using", defaultValue = "false") boolean skipU...
3.68
hbase_RpcServer_getService
/** * @param serviceName Some arbitrary string that represents a 'service'. * @param services Available services and their service interfaces. * @return BlockingService that goes with the passed <code>serviceName</code> */ protected static BlockingService getService(final List<BlockingServiceAndInterface> servic...
3.68
hadoop_FSDataOutputStreamBuilder_bufferSize
/** * Set the size of the buffer to be used. * * @param bufSize buffer size. * @return Generics Type B. */ public B bufferSize(int bufSize) { bufferSize = bufSize; return getThisBuilder(); }
3.68
shardingsphere-elasticjob_JobFacade_afterJobExecuted
/** * Call after job executed. * * @param shardingContexts sharding contexts */ public void afterJobExecuted(final ShardingContexts shardingContexts) { for (ElasticJobListener each : elasticJobListeners) { each.afterJobExecuted(shardingContexts); } }
3.68
flink_BlobServerConnection_put
/** * Handles an incoming PUT request from a BLOB client. * * @param inputStream The input stream to read incoming data from * @param outputStream The output stream to send data back to the client * @param buf An auxiliary buffer for data serialization/deserialization * @throws IOException thrown if an I/O error ...
3.68
framework_Action_setCaption
/** * Sets the caption. * * @param caption * the caption to set. */ public void setCaption(String caption) { this.caption = caption; }
3.68
hbase_MetricsAssignmentManager_updateRITOldestAge
/** * update the timestamp for oldest region in transition metrics. */ public void updateRITOldestAge(final long timestamp) { assignmentManagerSource.setRITOldestAge(timestamp); }
3.68
pulsar_LoadManagerShared_applyNamespacePolicies
// Determines the brokers available for the given service unit according to the given policies. // The brokers are put into brokerCandidateCache. public static void applyNamespacePolicies(final ServiceUnitId serviceUnit, final SimpleResourceAllocationPolicies policies, final Set<String> brokerCandidateCache, ...
3.68
hbase_SequenceIdAccounting_findLower
/** * Iterates over the given Map and compares sequence ids with corresponding entries in * {@link #lowestUnflushedSequenceIds}. If a region in {@link #lowestUnflushedSequenceIds} has a * sequence id less than that passed in <code>sequenceids</code> then return it. * @param sequenceids Sequenceids keyed by encoded ...
3.68
flink_UnresolvedIdentifier_asSummaryString
/** Returns a string that summarizes this instance for printing to a console or log. */ public String asSummaryString() { return Stream.of(catalogName, databaseName, objectName) .filter(Objects::nonNull) .map(EncodingUtils::escapeIdentifier) .collect(Collectors.joining(".")); }
3.68
flink_UpsertTestSinkBuilder_setKeySerializationSchema
/** * Sets the key {@link SerializationSchema} that transforms incoming records to byte[]. * * @param keySerializationSchema * @return {@link UpsertTestSinkBuilder} */ public UpsertTestSinkBuilder<IN> setKeySerializationSchema( SerializationSchema<IN> keySerializationSchema) { this.keySerializationSche...
3.68
hbase_LoadBalancerFactory_getDefaultLoadBalancerClass
/** * The default {@link LoadBalancer} class. * @return The Class for the default {@link LoadBalancer}. */ public static Class<? extends LoadBalancer> getDefaultLoadBalancerClass() { return StochasticLoadBalancer.class; }
3.68
morf_XmlDataSetConsumer_close
/** * Fired when a dataset has ended. * * @see org.alfasoftware.morf.dataset.DataSetConsumer#close(org.alfasoftware.morf.dataset.DataSetConsumer.CloseState) */ @Override public void close(CloseState closeState) { xmlStreamProvider.close(); }
3.68
flink_AbstractPagedOutputView_clear
/** * Clears the internal state. Any successive write calls will fail until either {@link * #advance()} or {@link #seekOutput(MemorySegment, int)} is called. * * @see #advance() * @see #seekOutput(MemorySegment, int) */ protected void clear() { this.currentSegment = null; this.positionInSegment = this.hea...
3.68
Activiti_CollectionUtil_mapOfClass
/** * Helper method to easily create a map with keys of type String and values of a given Class. Null values are allowed. * * @param clazz the target Value class * @param objects varargs containing the key1, value1, key2, value2, etc. Note: although an Object, we will cast the key to String internally * @throws Ac...
3.68
querydsl_BeanMap_put
/** * Sets the bean property with the given name to the given value. * * @param name the name of the property to set * @param value the value to set that property to * @return the previous value of that property */ @Override public Object put(String name, Object value) { if (bean != null) { Object ol...
3.68
hadoop_AllocateResponse_getUpdateErrors
/** * Get the list of container update errors to inform the * Application Master about the container updates that could not be * satisfied due to error. * * @return List of Update Container Errors. */ @Public @Unstable public List<UpdateContainerError> getUpdateErrors() { return new ArrayList<>(); }
3.68
framework_AbstractComponentConnector_sendContextClickEvent
/** * This method sends the context menu event to the server-side. Can be * overridden to provide extra information through an alternative RPC * interface. * * @since 7.6 * @param details * the mouse event details * @param eventTarget * the target of the event */ protected void sendConte...
3.68
framework_Potus_getFirstName
/** * @return the firstName */ public String getFirstName() { return firstName; }
3.68
hbase_MetaTableAccessor_getRegion
/** * Gets the region info and assignment for the specified region. * @param connection connection we're using * @param regionName Region to lookup. * @return Location and RegionInfo for <code>regionName</code> * @deprecated use {@link #getRegionLocation(Connection, byte[])} instead */ @Deprecated public static P...
3.68
morf_NamedParameterPreparedStatement_setFetchSize
/** * @param rows the number of rows to fetch * @see PreparedStatement#setFetchSize(int) * @exception SQLException if a database access error occurs, * this method is called on a closed <code>Statement</code> or the * condition {@code rows >= 0} is not satisfied. */ public void setFetchSize(int rows) throw...
3.68
hadoop_Anonymizer_main
/** * The main driver program to use the anonymization utility. * @param args */ public static void main(String[] args) { Anonymizer instance = new Anonymizer(); int result = 0; try { result = ToolRunner.run(instance, args); } catch (Exception e) { e.printStackTrace(System.err); System.exit(-1...
3.68
flink_Execution_sendUpdatePartitionInfoRpcCall
/** * Update the partition infos on the assigned resource. * * @param partitionInfos for the remote task */ private void sendUpdatePartitionInfoRpcCall(final Iterable<PartitionInfo> partitionInfos) { final LogicalSlot slot = assignedResource; if (slot != null) { final TaskManagerGateway taskManage...
3.68
framework_Table_getColumnIcons
/** * Gets the icons of the columns. * * <p> * The icons in headers match the property id:s given by the set visible * column headers. The table must be set in either * {@link #COLUMN_HEADER_MODE_EXPLICIT} or * {@link #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID} mode to show the headers * with icons. * </p> * *...
3.68
hbase_HBackupFileSystem_getManifestPath
// TODO we do not keep WAL files anymore // Move manifest file to other place private static Path getManifestPath(Configuration conf, Path backupRootPath, String backupId) throws IOException { FileSystem fs = backupRootPath.getFileSystem(conf); Path manifestPath = new Path(getBackupPath(backupRootPath.toString(),...
3.68
querydsl_Expressions_listPath
/** * Create a new Path expression * * @param type element type * @param queryType element expression type * @param metadata path metadata * @param <E> element type * @param <Q> element expression type * @return path expression */ public static <E, Q extends SimpleExpression<? super E>> ListPath<E, Q> listPath...
3.68
hbase_AdaptiveLifoCoDelCallQueue_offer
// Generic BlockingQueue methods we support @Override public boolean offer(CallRunner callRunner) { return queue.offer(callRunner); }
3.68
hbase_TableRecordReader_getCurrentValue
/** * Returns the current value. * @return The current value. * @throws IOException When the value is faulty. * @throws InterruptedException When the job is aborted. * @see org.apache.hadoop.mapreduce.RecordReader#getCurrentValue() */ @Override public Result getCurrentValue() throws IOException, Interrup...
3.68
pulsar_ManagedLedgerStorage_create
/** * Initialize the {@link ManagedLedgerStorage} from the provided resources. * * @param conf service config * @param bkProvider bookkeeper client provider * @return the initialized managed ledger storage. */ static ManagedLedgerStorage create(ServiceConfiguration conf, Metadat...
3.68
hadoop_ValidateRenamedFilesStage_getFilesCommitted
/** * Get the list of files committed. * @return a possibly empty list. */ private synchronized List<FileEntry> getFilesCommitted() { return filesCommitted; }
3.68
graphhopper_ArrayUtil_removeConsecutiveDuplicates
/** * Removes all duplicate elements of the given array in the range [0, end[ in place * * @return the size of the new range that contains no duplicates (smaller or equal to end). */ public static int removeConsecutiveDuplicates(int[] arr, int end) { int curr = 0; for (int i = 1; i < end; ++i) { if ...
3.68
hudi_AbstractTableFileSystemView_convertFileStatusesToLogFiles
/** * Helper to convert file-status to log-files. * * @param statuses List of File-Status */ private Stream<HoodieLogFile> convertFileStatusesToLogFiles(FileStatus[] statuses) { Predicate<FileStatus> rtFilePredicate = fileStatus -> { String fileName = fileStatus.getPath().getName(); Matcher matcher = FSU...
3.68
framework_VCalendar_setReadOnly
/** * Is the component read-only. * * @param readOnly * True if component is readonly */ public void setReadOnly(boolean readOnly) { this.readOnly = readOnly; }
3.68
hbase_HDFSBlocksDistribution_getBlockLocalityIndexForSsd
/** * Get the block locality index for a ssd for a given host * @param host the host name * @return the locality index with ssd of the given host */ public float getBlockLocalityIndexForSsd(String host) { if (uniqueBlocksTotalWeight == 0) { return 0.0f; } else { return (float) getBlocksLocalityWeightInt...
3.68
framework_VComboBox_startWaitingForFilteringResponse
/** * Set a flag that filtering of options is pending a response from the * server. */ private void startWaitingForFilteringResponse() { waitingForFilteringResponse = true; }
3.68
graphhopper_ReaderRelation_getRef
/** * member reference which is an OSM ID */ public long getRef() { return ref; }
3.68
framework_LegacyCommunicationManager_cache
/** * * @param object * @return true if the given class was added to cache */ public boolean cache(Object object) { return res.add(object); }
3.68
flink_DoubleParser_parseField
/** * Static utility to parse a field of type double from a byte sequence that represents text * characters (such as when read from a file stream). * * @param bytes The bytes containing the text data that should be parsed. * @param startPos The offset to start the parsing. * @param length The length of the byte s...
3.68
rocketmq-connect_ParsedSchema_validate
/** * validate data */ default void validate() { }
3.68
hadoop_RequestFactoryImpl_getContentEncoding
/** * Get the content encoding (e.g. gzip) or return null if none. * @return content encoding */ @Override public String getContentEncoding() { return contentEncoding; }
3.68
flink_SourceCoordinatorContext_onCheckpointComplete
/** * Invoked when a successful checkpoint has been taken. * * @param checkpointId the id of the successful checkpoint. */ void onCheckpointComplete(long checkpointId) { assignmentTracker.onCheckpointComplete(checkpointId); }
3.68
framework_VDateField_setDefaultDate
/** * Set the default date using a map with date values. * * @see #setCurrentDate(Map) * @param defaultValues * a map from resolutions to date values * @since 8.1.2 */ public void setDefaultDate(Map<R, Integer> defaultValues) { setDefaultDate(getDate(defaultValues)); }
3.68
zxing_RSSExpandedReader_isValidSequence
// Whether the pairs form a valid finder pattern sequence, either complete or a prefix private static boolean isValidSequence(List<ExpandedPair> pairs, boolean complete) { for (int[] sequence : FINDER_PATTERN_SEQUENCES) { boolean sizeOk = (complete ? pairs.size() == sequence.length : pairs.size() <= sequence.len...
3.68
graphhopper_ViaRouting_lookup
/** * @throws MultiplePointsNotFoundException in case one or more points could not be resolved */ public static List<Snap> lookup(EncodedValueLookup lookup, List<GHPoint> points, EdgeFilter snapFilter, LocationIndex locationIndex, List<String> snapPreventions, List<String> pointHints, ...
3.68
flink_Costs_addHeuristicNetworkCost
/** * Adds the heuristic costs for network to the current heuristic network costs for this Costs * object. * * @param cost The heuristic network cost to add. */ public void addHeuristicNetworkCost(double cost) { if (cost <= 0) { throw new IllegalArgumentException("Heuristic costs must be positive."); ...
3.68
flink_LimitedConnectionsFileSystem_getMaxNumOpenStreamsTotal
/** Gets the maximum number of concurrently open streams (input + output). */ public int getMaxNumOpenStreamsTotal() { return maxNumOpenStreamsTotal; }
3.68
dubbo_RegistryDirectory_toInvokers
/** * Turn urls into invokers, and if url has been referred, will not re-reference. * the items that will be put into newUrlInvokeMap will be removed from oldUrlInvokerMap. * * @param oldUrlInvokerMap it might be modified during the process. * @param urls * @return invokers */ private Map<URL, Invoker<T>> toInvo...
3.68
flink_SqlFunctionUtils_byteArrayCompare
/** * Compares two byte arrays in lexicographical order. * * <p>The result is positive if {@code array1} is great than {@code array2}, negative if {@code * array1} is less than {@code array2} and 0 if {@code array1} is equal to {@code array2}. * * <p>Note: Currently, this is used in {@code ScalarOperatorGens} for...
3.68
morf_AddTable_apply
/** * @see org.alfasoftware.morf.upgrade.SchemaChange#apply(org.alfasoftware.morf.metadata.Schema) * @return {@link Schema} with new table added. */ @Override public Schema apply(Schema schema) { return new AugmentedSchema(schema, newTable); }
3.68
hudi_MetadataConversionUtils_convertCommitMetadata
/** * Convert commit metadata from json to avro. */ public static <T extends SpecificRecordBase> T convertCommitMetadata(HoodieCommitMetadata hoodieCommitMetadata) { if (hoodieCommitMetadata instanceof HoodieReplaceCommitMetadata) { return (T) convertReplaceCommitMetadata((HoodieReplaceCommitMetadata) hoodieCom...
3.68
hbase_ProcedureExecutor_registerListener
// ========================================================================== // Listeners helpers // ========================================================================== public void registerListener(ProcedureExecutorListener listener) { this.listeners.add(listener); }
3.68
hadoop_AMRMProxyService_getRootInterceptor
/** * Gets the root request interceptor. * * @return the root request interceptor */ public synchronized RequestInterceptor getRootInterceptor() { return rootInterceptor; }
3.68
framework_Label_getDataSourceValue
/** * Returns the current value of the data source converted using the current * locale. * * @return */ private String getDataSourceValue() { return ConverterUtil.convertFromModel( getPropertyDataSource().getValue(), String.class, getConverter(), getLocale()); }
3.68
hbase_RegionServerSnapshotManager_buildSubprocedure
/** * If in a running state, creates the specified subprocedure for handling an online snapshot. * Because this gets the local list of regions to snapshot and not the set the master had, there * is a possibility of a race where regions may be missed. This detected by the master in the * snapshot verification step. ...
3.68
hbase_SimpleRegionNormalizer_getMergeMinRegionAge
/** * Return this instance's configured value for {@value #MERGE_MIN_REGION_AGE_DAYS_KEY}. */ public Period getMergeMinRegionAge() { return normalizerConfiguration.getMergeMinRegionAge(); }
3.68
druid_Lexer_mark
//出现多次调用mark()后调用reset()会有问题 @Deprecated public SavePoint mark() { return this.savePoint = markOut(); }
3.68
hudi_SparkPreCommitValidator_publishRunStats
/** * Publish pre-commit validator run stats for a given commit action. */ private void publishRunStats(String instantTime, long duration) { // Record validator duration metrics. if (getWriteConfig().isMetricsOn()) { HoodieTableMetaClient metaClient = getHoodieTable().getMetaClient(); Option<HoodieInstant...
3.68
hbase_MasterQuotaManager_removeTableFromNamespaceQuota
/** * Remove table from namespace quota. * @param tName - The table name to update quota usage. * @throws IOException Signals that an I/O exception has occurred. */ public void removeTableFromNamespaceQuota(TableName tName) throws IOException { if (initialized) { namespaceQuotaManager.removeFromNamespaceUsage...
3.68
flink_Tuple19_copy
/** * Shallow tuple copy. * * @return A new Tuple with the same fields as this. */ @Override @SuppressWarnings("unchecked") public Tuple19< T0, T1, T2, T3, T4, T5, T6, T7, ...
3.68
hbase_RemoteProcedureException_serialize
/** * Converts a RemoteProcedureException to an array of bytes. * @param source the name of the external exception source * @param t the "local" external exception (local) * @return protobuf serialized version of RemoteProcedureException */ public static byte[] serialize(String source, Throwable t) { return...
3.68
hudi_BaseAvroPayload_isDeleted
/** * Defines whether this implementation of {@link HoodieRecordPayload} is deleted. * We will not do deserialization in this method. */ public boolean isDeleted(Schema schema, Properties props) { return isDeletedRecord; }
3.68
hadoop_GlobPattern_hasWildcard
/** * @return true if this is a wildcard pattern (with special chars) */ public boolean hasWildcard() { return hasWildcard; }
3.68
framework_Color_getCSS
/** * Returns CSS representation of the Color, e.g. #000000. */ public String getCSS() { String redString = Integer.toHexString(red); redString = redString.length() < 2 ? "0" + redString : redString; String greenString = Integer.toHexString(green); greenString = greenString.length() < 2 ? "0" + green...
3.68
framework_VTree_getNavigationPageDownKey
/** * Get the key the moves the selection one page down in the table. By * default this is the Page Down key but by overriding this you can change * the key to whatever you want. * * @return */ protected int getNavigationPageDownKey() { return KeyCodes.KEY_PAGEDOWN; }
3.68
pulsar_ClientCnxIdleState_isUsing
/** * @return Whether this connection is in use. */ public boolean isUsing() { return getIdleStat() == State.USING; }
3.68