name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
querydsl_GuavaGroupBy_groupBy
/** * Create a new GroupByBuilder for the given key expression * * @param key key for aggregation * @return builder for further specification */ public static <K> GuavaGroupByBuilder<K> groupBy(Expression<K> key) { return new GuavaGroupByBuilder<K>(key); }
3.68
morf_AnalyseTable_isApplied
/** * {@inheritDoc} * * @see org.alfasoftware.morf.upgrade.SchemaChange#isApplied(Schema, ConnectionResources) */ @Override public boolean isApplied(Schema schema, ConnectionResources database) { return true; }
3.68
hmily_FileUtils_writeFile
/** * Write file. * * @param fullFileName the full file name * @param contents the contents */ public static void writeFile(final String fullFileName, final byte[] contents) { try { RandomAccessFile raf = new RandomAccessFile(fullFileName, "rw"); try (FileChannel channel = raf.getChannel())...
3.68
hadoop_AccessTokenTimer_shouldRefresh
/** * Return true if the current token has expired or will expire within the * EXPIRE_BUFFER_MS (to give ample wiggle room for the call to be made to * the server). */ public boolean shouldRefresh() { long lowerLimit = nextRefreshMSSinceEpoch - EXPIRE_BUFFER_MS; long currTime = timer.now(); return currTime > ...
3.68
flink_DataStream_print
/** * Writes a DataStream to the standard output stream (stdout). * * <p>For each element of the DataStream the result of {@link Object#toString()} is written. * * <p>NOTE: This will print to stdout on the machine where the code is executed, i.e. the Flink * worker. * * @param sinkIdentifier The string to prefi...
3.68
hbase_MasterProcedureScheduler_waitRegion
// ============================================================================ // Region Locking Helpers // ============================================================================ /** * Suspend the procedure if the specified region is already locked. * @param procedure the procedure trying to acquire the lock ...
3.68
hadoop_LightWeightLinkedSet_pollAll
/** * Remove all elements from the set and return them in order. Traverse the * link list, don't worry about hashtable - faster version of the parent * method. */ @Override public List<T> pollAll() { List<T> retList = new ArrayList<T>(size); while (head != null) { retList.add(head.element); head = head....
3.68
framework_AbstractComponent_setComponentError
/** * Sets the component's error message. The message may contain certain XML * tags, for more information see * * @link Component.ErrorMessage#ErrorMessage(String, int) * * @param componentError * the new <code>ErrorMessage</code> of the component. */ public void setComponentError(ErrorMessage compo...
3.68
hbase_OrderedBytes_blobVarEncodedLength
/** * Calculate the expected BlobVar encoded length based on unencoded length. */ public static int blobVarEncodedLength(int len) { if (0 == len) return 2; // 1-byte header + 1-byte terminator else return (int) Math.ceil((len * 8) // 8-bits per input byte / 7.0) // 7-bits of input data per encoded byte, round...
3.68
framework_GridSingleSelect_getSelectedItems
/** * Returns a singleton set of the currently selected item or an empty set if * no item is selected. * * @return a singleton set of the selected item if any, an empty set * otherwise * * @see #getSelectedItem() */ public Set<T> getSelectedItems() { return model.getSelectedItems(); }
3.68
hadoop_FederationProtocolPBTranslator_readInstance
/** * Read instance from base64 data. * * @param base64String String containing Base64 data. * @throws IOException If the protobuf message build fails. */ @SuppressWarnings("unchecked") public void readInstance(String base64String) throws IOException { byte[] bytes = Base64.decodeBase64(base64String); Message ...
3.68
pulsar_KeyValueSchemaImpl_encode
// encode as bytes: [key.length][key.bytes][value.length][value.bytes] or [value.bytes] public byte[] encode(KeyValue<K, V> message) { if (keyValueEncodingType != null && keyValueEncodingType == KeyValueEncodingType.INLINE) { return KeyValue.encode( message.getKey(), keySchema, ...
3.68
flink_RocksDBResourceContainer_getWriteBufferManagerCapacity
/** * Gets write buffer manager capacity. * * @return the capacity of the write buffer manager, or null if write buffer manager is not * enabled. */ public Long getWriteBufferManagerCapacity() { if (sharedResources == null) { return null; } return sharedResources.getResourceHandle().getWri...
3.68
morf_DatabaseType_parseJdbcUrl
/** * Extracts the database connection details from a JDBC URL. * * <p>Finds the first available {@link DatabaseType} with a matching protocol, * then uses that to parse out the connection details.</p> * * <p>If there are multiple matches for the protocol, {@link IllegalStateException} * will be thrown.</p> * ...
3.68
hudi_BaseHoodieWriteClient_scheduleLogCompaction
/** * Schedules a new log compaction instant. * @param extraMetadata Extra Metadata to be stored */ public Option<String> scheduleLogCompaction(Option<Map<String, String>> extraMetadata) throws HoodieIOException { String instantTime = createNewInstantTime(); return scheduleLogCompactionAtInstant(instantTime, ext...
3.68
hadoop_AppCatalog_addRestResourceClasses
/** * Add your own resources here. */ private void addRestResourceClasses(final Set<Class<?>> resources) { resources.add(AppDetailsController.class); }
3.68
hbase_ZKSplitLog_getEncodedNodeName
/** * Gets the full path node name for the log file being split. This method will url encode the * filename. * @param zkw zk reference * @param filename log file name (only the basename) */ public static String getEncodedNodeName(ZKWatcher zkw, String filename) { return ZNodePaths.joinZNode(zkw.getZNodePath...
3.68
querydsl_AntMetaDataExporter_addNumericMapping
/** * Adds NumericMapping instance, called by Ant */ public void addNumericMapping(NumericMapping mapping) { numericMappings.add(mapping); }
3.68
hbase_CompositeImmutableSegment_last
// *** Methods for SegmentsScanner @Override public Cell last() { throw new IllegalStateException("Not supported by CompositeImmutableScanner"); }
3.68
druid_DruidPooledConnection_getGloablVariables
/** * @since 1.0.28 */ public Map<String, Object> getGloablVariables() { return this.holder.globalVariables; }
3.68
hbase_HBaseConfiguration_subset
/** * Returns a subset of the configuration properties, matching the given key prefix. The prefix is * stripped from the return keys, ie. when calling with a prefix of "myprefix", the entry * "myprefix.key1 = value1" would be returned as "key1 = value1". If an entry's key matches the * prefix exactly ("myprefix = v...
3.68
morf_CompositeSchema_viewNames
/** * @see org.alfasoftware.morf.metadata.Schema#viewNames() */ @Override public Collection<String> viewNames() { Set<String> result = Sets.newHashSet(); Set<String> seenViews = Sets.newHashSet(); for (Schema schema : delegates) { for (View view : schema.views()) { if (seenViews.add(view.getName().toU...
3.68
hadoop_ContainerServiceRecordProcessor_getRecordTypes
/** * Returns the record types associated with a container service record. * @return the record type array */ @Override public int[] getRecordTypes() { return new int[] {Type.A, Type.AAAA, Type.PTR, Type.TXT}; }
3.68
flink_WindowedStateTransformation_aggregate
/** * Applies the given window function to each window. The window function is called for each * evaluation of the window for each key individually. The output of the window function is * interpreted as a regular non-windowed stream. * * <p>Arriving data is incrementally aggregated using the given aggregate functi...
3.68
hadoop_OBSCommonUtils_keyToQualifiedPath
/** * Convert a key to a fully qualified path. * * @param owner the owner OBSFileSystem instance * @param key input key * @return the fully qualified path including URI scheme and bucket name. */ static Path keyToQualifiedPath(final OBSFileSystem owner, final String key) { return qualify(owner, keyToPath(...
3.68
hadoop_BlockData_getBlockSize
/** * Gets the size of each block. * @return the size of each block. */ public int getBlockSize() { return blockSize; }
3.68
hbase_CompactingMemStore_getSegments
// the getSegments() method is used for tests only @Override protected List<Segment> getSegments() { List<? extends Segment> pipelineList = pipeline.getSegments(); List<Segment> list = new ArrayList<>(pipelineList.size() + 2); list.add(getActive()); list.addAll(pipelineList); list.addAll(snapshot.getAllSegmen...
3.68
framework_TableMoveFocusWithSelection_getTestDescription
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#getTestDescription() */ @Override protected String getTestDescription() { return "Changing selection in single select mode should move focus"; }
3.68
pulsar_PatternMultiTopicsConsumerImpl_run
// TimerTask to recheck topics change, and trigger subscribe/unsubscribe based on the change. @Override public void run(Timeout timeout) throws Exception { if (timeout.isCancelled()) { return; } client.getLookup().getTopicsUnderNamespace(namespaceName, subscriptionMode, topicsPattern.pattern(), topi...
3.68
flink_HiveParserQueryState_createConf
/** * If there are query specific settings to overlay, then create a copy of config There are two * cases we need to clone the session config that's being passed to hive driver 1. Async query - * If the client changes a config setting, that shouldn't reflect in the execution already * underway 2. confOverlay - The ...
3.68
hadoop_DataNodeFaultInjector_logDelaySendingPacketDownstream
/** * Used as a hook to intercept the latency of sending packet. */ public void logDelaySendingPacketDownstream( final String mirrAddr, final long delayMs) throws IOException { }
3.68
flink_RpcEndpoint_schedule
/** * The mainScheduledExecutor manages the given callable and sends it to the gateway after * the given delay. * * @param callable the callable to execute * @param delay the time from now to delay the execution * @param unit the time unit of the delay parameter * @param <V> result type of the callable * @retur...
3.68
framework_SelectAllConstantViewport_setup
/* * (non-Javadoc) * * @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. * VaadinRequest) */ @Override protected void setup(VaadinRequest request) { final Table table = new Table(); table.addContainerProperty("", Integer.class, null); table.setSizeFull(); table.setMultiSelec...
3.68
framework_LegacyLocatorStrategy_getPathForWidget
/** * Creates a locator String for the given widget. The path can be used to * locate the widget using {@link #getWidgetFromPath(String, Widget)}. * <p/> * Returns null if no path can be determined for the widget or if the widget * is null. * * @param w * The target widget * @return A String locator...
3.68
flink_HiveStatsUtil_updateStats
/** * Update original table statistics parameters. * * @param newTableStats new catalog table statistics. * @param parameters original hive table statistics parameters. */ public static void updateStats( CatalogTableStatistics newTableStats, Map<String, String> parameters) { parameters.put(StatsSetupCo...
3.68
hadoop_LeveldbIterator_hasPrev
/** * @return true if there is a previous entry in the iteration. */ public boolean hasPrev() throws DBException { try { return iter.hasPrev(); } catch (DBException e) { throw e; } catch (RuntimeException e) { throw new DBException(e.getMessage(), e); } }
3.68
hudi_HoodieTableMetadataUtil_convertFilesToBloomFilterRecords
/** * Convert added and deleted files metadata to bloom filter index records. */ public static HoodieData<HoodieRecord> convertFilesToBloomFilterRecords(HoodieEngineContext engineContext, Map<String, List<String>> partitionToDeletedFiles, ...
3.68
flink_OperationTreeBuilder_aliasBackwardFields
/** Rename fields in the input {@link QueryOperation}. */ private QueryOperation aliasBackwardFields( QueryOperation inputOperation, List<String> alias, int aliasStartIndex) { if (!alias.isEmpty()) { List<String> namesBeforeAlias = inputOperation.getResolvedSchema().getColumnNames(); List<S...
3.68
hbase_HRegion_hasSeenWrongRegion
/** Returns If a {@link WrongRegionException} has been observed. */ boolean hasSeenWrongRegion() { return wrongRegion; }
3.68
pulsar_SubscriptionPolicies_checkEmpty
/** * Check if this SubscriptionPolicies is empty. Empty SubscriptionPolicies can be auto removed from TopicPolicies. * @return true if this SubscriptionPolicies is empty. */ public boolean checkEmpty() { return dispatchRate == null; }
3.68
streampipes_PrimitivePropertyBuilder_label
/** * Assigns a human-readable label to the event property. The label is used in the StreamPipes UI for better * explaining users the meaning of the property. * * @param label * @return this */ public PrimitivePropertyBuilder label(String label) { this.eventProperty.setLabel(label); return this; }
3.68
flink_FileMergingSnapshotManager_getManagedDirName
/** * Generate an unique managed directory name for one subtask. * * @return the managed directory name. */ public String getManagedDirName() { return String.format("%s_%d_%d_", operatorIDString, subtaskIndex, parallelism) .replaceAll("[^a-zA-Z0-9\\-]", "_"); }
3.68
flink_OutputFormatBase_postOpen
/** * Initialize the OutputFormat. This method is called at the end of {@link * OutputFormatBase#open(int, int)}. */ protected void postOpen() {}
3.68
flink_DynamicSinkUtils_convertToRowLevelUpdate
/** * Convert tableModify node to a RelNode representing for row-level update. * * @return a tuple contains the RelNode and the index for the required physical columns for * row-level update. */ private static Tuple2<RelNode, int[]> convertToRowLevelUpdate( LogicalTableModify tableModify, Conte...
3.68
framework_VDragEvent_setElementOver
/** * @since 7.2 * @param targetElement * target element over which DnD event has happened * @see #getElementOver() */ public void setElementOver(Element targetElement) { setElementOver(DOM.asOld(targetElement)); }
3.68
framework_Calendar_setDefaultHandlers
/** * Set all the wanted default handlers here. This is always called after * constructing this object. All other events have default handlers except * range and event click. */ protected void setDefaultHandlers() { setHandler(new BasicBackwardHandler()); setHandler(new BasicForwardHandler()); setHandle...
3.68
flink_BlobServer_getBlobExpiryTimes
/** * Returns the blob expiry times - for testing purposes only! * * @return blob expiry times (internal state!) */ @VisibleForTesting ConcurrentMap<Tuple2<JobID, TransientBlobKey>, Long> getBlobExpiryTimes() { return blobExpiryTimes; }
3.68
hbase_CellComparatorImpl_compareRows
/** * Compares the row part of the cell with a simple plain byte[] like the stopRow in Scan. This * should be used with context where for hbase:meta cells the * {{@link MetaCellComparator#META_COMPARATOR} should be used the cell to be compared the kv * serialized byte[] to be compared with the offset in the byte[] ...
3.68
querydsl_JTSSurfaceExpression_pointOnSurface
/** * A Point guaranteed to be on this Surface. * * @return point on surface */ public JTSPointExpression<Point> pointOnSurface() { if (pointOnSurface == null) { pointOnSurface = JTSGeometryExpressions.pointOperation(SpatialOps.POINT_ON_SURFACE, mixin); } return pointOnSurface; }
3.68
framework_SingleSelectionModel_addSelectionListener
/** * {@inheritDoc} * <p> * Use {@link #addSingleSelectionListener(SingleSelectionListener)} for more * specific single selection event. * * @see #addSingleSelectionListener(SingleSelectionListener) */ @Override public default Registration addSelectionListener( SelectionListener<T> listener) { return...
3.68
graphhopper_GraphHopper_importOrLoad
/** * Imports provided data from disc and creates graph. Depending on the settings the resulting * graph will be stored to disc so on a second call this method will only load the graph from * disc which is usually a lot faster. */ public GraphHopper importOrLoad() { if (!load()) { printInfo(); p...
3.68
framework_TreeData_getParent
/** * Get the parent item for the given item. * * @param item * the item for which to retrieve the parent item for * @return parent item for the given item or {@code null} if the item is a * root item. * @throws IllegalArgumentException * if the item does not exist in this structu...
3.68
graphhopper_Country_getAlpha2
/** * @return the ISO 3166-1:alpha2 code of this country */ public String getAlpha2() { return alpha2; }
3.68
hadoop_MutableStat_setExtended
/** * Set whether to display the extended stats (stdev, min/max etc.) or not * @param extended enable/disable displaying extended stats */ public synchronized void setExtended(boolean extended) { this.extended = extended; }
3.68
hadoop_TaskPool_sleepInterval
/** * Set the sleep interval. * @param value new value * @return the builder */ public Builder<I> sleepInterval(final int value) { sleepInterval = value; return this; }
3.68
hbase_RequestConverter_buildModifyTableRequest
/** * Creates a protocol buffer ModifyTableRequest * @return a ModifyTableRequest */ public static ModifyTableRequest buildModifyTableRequest(final TableName tableName, final TableDescriptor tableDesc, final long nonceGroup, final long nonce, final boolean reopenRegions) { ModifyTableRequest.Builder builder = ...
3.68
hadoop_AzureBlobFileSystem_getDelegationTokenManager
/** * Get any Delegation Token manager created by the filesystem. * @return the DT manager or null. */ @VisibleForTesting AbfsDelegationTokenManager getDelegationTokenManager() { return delegationTokenManager; }
3.68
flink_LinkedOptionalMap_mergeRightIntoLeft
/** Tries to merges the keys and the values of @right into @left. */ public static <K, V> MergeResult<K, V> mergeRightIntoLeft( LinkedOptionalMap<K, V> left, LinkedOptionalMap<K, V> right) { LinkedOptionalMap<K, V> merged = new LinkedOptionalMap<>(left); merged.putAll(right); return new MergeResult...
3.68
framework_AbstractListing_removeDataGenerator
/** * Removes the given data generator from this listing. If this listing does * not have the generator, does nothing. * * @param generator * the data generator to remove, not null */ protected void removeDataGenerator(DataGenerator<T> generator) { getDataCommunicator().removeDataGenerator(generato...
3.68
morf_DataValueLookup_getDate
/** * Gets the value as a {@link java.sql.Date}. Will attempt conversion where possible * and throw a suitable conversion exception if the conversion fails. * May return {@code null} if the value is not set or is explicitly set * to {@code null}. * * @param name The column name. * @return The value. */ public ...
3.68
flink_TwoPhaseCommitSinkFunction_recoverAndAbort
/** Abort a transaction that was rejected by a coordinator after a failure. */ protected void recoverAndAbort(TXN transaction) { abort(transaction); }
3.68
framework_CalendarConnector_registerEventToolTips
/** * Register the description of the events as tooltips. This way, any event * displaying widget can use the event index as a key to display the * tooltip. */ private void registerEventToolTips(List<CalendarState.Event> events) { for (CalendarState.Event e : events) { if (e.description != null && !"".e...
3.68
morf_InsertStatement_useParallelDml
/** * Request that this statement is executed with a parallel execution plan for data manipulation language (DML). This request will have no effect unless the database implementation supports it and the feature is enabled. * * <p>For statement that will affect a high percentage or rows in the table, a parallel execu...
3.68
framework_LayoutManager_setConnection
/** * Sets the application connection this instance is connected to. Called * internally by the framework. * * @param connection * the application connection this instance is connected to */ public void setConnection(ApplicationConnection connection) { if (this.connection != null) { throw n...
3.68
hbase_BloomFilterMetrics_incrementEligible
/** * Increment for cases where bloom filter could have been used but wasn't defined or loaded. */ public void incrementEligible() { eligibleRequests.increment(); }
3.68
flink_GlobalProperties_setRangePartitioned
/** * Set the parameters for range partition. * * @param ordering Order of the partitioned fields * @param distribution The data distribution for range partition. User can supply a customized * data distribution, also the data distribution can be null. */ public void setRangePartitioned(Ordering ordering, Dat...
3.68
hbase_VisibilityLabelsCache_getLabelsCount
/** Returns The total number of visibility labels. */ public int getLabelsCount() { this.lock.readLock().lock(); try { return this.labels.size(); } finally { this.lock.readLock().unlock(); } }
3.68
dubbo_LoggerAdapter_isConfigured
/** * Return is the current logger has been configured. * Used to check if logger is available to use. * * @return true if the current logger has been configured */ default boolean isConfigured() { return true; }
3.68
hbase_OrderedBytes_decodeInt64
/** * Decode an {@code int64} value. * @see #encodeInt64(PositionedByteRange, long, Order) */ public static long decodeInt64(PositionedByteRange src) { final byte header = src.get(); assert header == FIXED_INT64 || header == DESCENDING.apply(FIXED_INT64); Order ord = header == FIXED_INT64 ? ASCENDING : DESCEND...
3.68
morf_AddIndex_isApplied
/** * {@inheritDoc} * * @see org.alfasoftware.morf.upgrade.SchemaChange#isApplied(Schema, ConnectionResources) */ @Override public boolean isApplied(Schema schema, ConnectionResources database) { if (!schema.tableExists(tableName)) { return false; } Table table = schema.getTable(tableName); SchemaHomol...
3.68
hbase_RegionStates_getRegionsOfTableForDeleting
/** * Get the regions for deleting a table. * <p/> * Here we need to return all the regions irrespective of the states in order to archive them all. * This is because if we don't archive OFFLINE/SPLIT regions and if a snapshot or a cloned table * references to the regions, we will lose the data of the regions. */...
3.68
hadoop_ResourceMappings_addAssignedResources
/** * Adds the resources for a given resource type. * * @param resourceType Resource Type * @param assigned Assigned resources to add */ public void addAssignedResources(String resourceType, AssignedResources assigned) { assignedResourcesMap.put(resourceType, assigned); }
3.68
dubbo_ParamType_addSupportTypes
/** * exclude null types * * @param classes * @return */ private static List<Class> addSupportTypes(Class... classes) { ArrayList<Class> types = new ArrayList<>(); for (Class clazz : classes) { if (clazz == null) { continue; } types.add(clazz); } return type...
3.68
flink_SubpartitionDiskCacheManager_removeAllBuffers
/** Note that allBuffers can be touched by multiple threads. */ List<Tuple2<Buffer, Integer>> removeAllBuffers() { synchronized (allBuffers) { List<Tuple2<Buffer, Integer>> targetBuffers = new ArrayList<>(allBuffers); allBuffers.clear(); return targetBuffers; } }
3.68
hbase_AccessController_permissionGranted
/** * Check the current user for authorization to perform a specific action against the given set of * row data. * @param opType the operation type * @param user the user * @param e the coprocessor environment * @param families the map of column families to qualifiers present in the request * @param...
3.68
streampipes_InfluxDbClient_query
// Returns a list with the entries of the query. If there are no entries, it returns an empty list List<List<Object>> query(String query) { if (!connected) { throw new RuntimeException("InfluxDbClient not connected"); } QueryResult queryResult = influxDb.query(new Query(query, connectionSettings.getDatabaseNa...
3.68
flink_ListView_addAll
/** * Adds all of the elements of the specified list to this list view. * * @throws Exception Thrown if the system cannot add all data. * @param list The list with the elements that will be stored in this list view. */ public void addAll(List<T> list) throws Exception { this.list.addAll(list); }
3.68
flink_StreamTaskSourceInput_checkpointStarted
/** * This method is used with unaligned checkpoints to mark the arrival of a first {@link * CheckpointBarrier}. For chained sources, there is no {@link CheckpointBarrier} per se flowing * through the job graph. We can assume that an imaginary {@link CheckpointBarrier} was produced * by the source, at any point of ...
3.68
hadoop_PathFinder_getAbsolutePath
/** * Returns the full path name of this file if it is listed in the path */ public File getAbsolutePath(String filename) { if (pathenv == null || pathSep == null || fileSep == null) { return null; } int val = -1; String classvalue = pathenv + pathSep; while (((val = classvalue.indexOf(pathSep)) >= 0) ...
3.68
hudi_HoodieInputFormatUtils_refreshFileStatus
/** * Checks the file status for a race condition which can set the file size to 0. 1. HiveInputFormat does * super.listStatus() and gets back a FileStatus[] 2. Then it creates the HoodieTableMetaClient for the paths listed. * 3. Generation of splits looks at FileStatus size to create splits, which skips this file ...
3.68
shardingsphere-elasticjob_FailoverService_failoverIfNecessary
/** * Failover if necessary. */ public void failoverIfNecessary() { if (needFailover()) { jobNodeStorage.executeInLeader(FailoverNode.LATCH, new FailoverLeaderExecutionCallback()); } }
3.68
querydsl_NumberExpression_stringValue
/** * Create a cast to String expression * * @see java.lang.Object#toString() * @return string representation */ public StringExpression stringValue() { if (stringCast == null) { stringCast = Expressions.stringOperation(Ops.STRING_CAST, mixin); } return stringCast; }
3.68
framework_VFilterSelect_reset
/** * Resets the Select to its initial state */ private void reset() { debug("VFS: reset()"); if (currentSuggestion != null) { String text = currentSuggestion.getReplacementString(); setPromptingOff(text); setSelectedItemIcon(currentSuggestion.getIconUri()); selectedOptionKey ...
3.68
framework_HierarchicalDataCommunicator_isExpanded
/** * Returns whether given item is expanded. * * @param item * the item to test * @return {@code true} if item is expanded; {@code false} if not */ public boolean isExpanded(T item) { return mapper.isExpanded(item); }
3.68
shardingsphere-elasticjob_JobNodeStorage_fillJobNode
/** * Fill job node. * * @param node node * @param value data of job node */ public void fillJobNode(final String node, final Object value) { regCenter.persist(jobNodePath.getFullPath(node), value.toString()); }
3.68
hudi_OptionsResolver_emitChangelog
/** * Returns whether the source should emit changelog. * * @return true if the source is read as streaming with changelog mode enabled */ public static boolean emitChangelog(Configuration conf) { return conf.getBoolean(FlinkOptions.READ_AS_STREAMING) && conf.getBoolean(FlinkOptions.CHANGELOG_ENABLED) || co...
3.68
querydsl_HibernateUpdateClause_setLockMode
/** * Set the lock mode for the given path. * @return the current object */ @SuppressWarnings("unchecked") public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) { lockModes.put(path, lockMode); return this; }
3.68
hadoop_DiskBalancerWorkItem_parseJson
/** * Reads a DiskBalancerWorkItem Object from a Json String. * * @param json - Json String. * @return DiskBalancerWorkItem Object * @throws IOException */ public static DiskBalancerWorkItem parseJson(String json) throws IOException { Preconditions.checkNotNull(json); return READER.readValue(json); }
3.68
framework_VaadinService_removeFromHttpSession
/** * Performs the actual removal of the VaadinSession from the underlying HTTP * session after sanity checks have been performed. * * @since 7.6 * @param wrappedSession * the underlying HTTP session */ protected void removeFromHttpSession(WrappedSession wrappedSession) { wrappedSession.removeAttr...
3.68
flink_FixedLengthRecordSorter_getIterator
/** * Gets an iterator over all records in this buffer in their logical order. * * @return An iterator returning the records in their logical order. */ @Override public final MutableObjectIterator<T> getIterator() { final SingleSegmentInputView startIn = new SingleSegmentInputView(this.recordsPerSeg...
3.68
framework_AbstractInlineDateFieldConnector_updateListeners
/** * Updates listeners registered (or register them) for the widget based on * the current resolution. * <p> * Subclasses may override this method to keep the common logic inside the * {@link #updateFromUIDL(UIDL, ApplicationConnection)} method as is and * customizing only listeners logic. */ @SuppressWarnings(...
3.68
hadoop_Cluster_getClusterStatus
/** * Get current cluster status. * * @return object of {@link ClusterMetrics} * @throws IOException * @throws InterruptedException */ public ClusterMetrics getClusterStatus() throws IOException, InterruptedException { return client.getClusterMetrics(); }
3.68
hudi_DataPruner_test
/** * Filters the index row with specific data filters and query fields. * * @param indexRow The index row * @param queryFields The query fields referenced by the filters * @return true if the index row should be considered as a candidate */ public boolean test(RowData indexRow, RowType.RowField[] queryFields)...
3.68
hbase_RandomRowFilter_areSerializedFieldsEqual
/** * Returns true if and only if the fields of the filter that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) { return true; } if (!(o instanceof RandomRowFilter)) { return false; } RandomR...
3.68
flink_SerializedCompositeKeyBuilder_buildCompositeKeyNamesSpaceUserKey
/** * Returns a serialized composite key, from the key and key-group provided in a previous call to * {@link #setKeyAndKeyGroup(Object, int)} and the given namespace, followed by the given * user-key. * * @param namespace the namespace to concatenate for the serialized composite key bytes. * @param namespaceSeria...
3.68
hbase_WindowMovingAverage_getMostRecentPosition
/** Returns index of most recent */ protected int getMostRecentPosition() { return mostRecent; }
3.68
hadoop_ApplicationMaster_run
/** * Connects to CM, sets up container launch context for shell command and * eventually dispatches the container start request to the CM. */ @Override public void run() { LOG.info("Setting up container launch context for containerid=" + container.getId() + ", isNameNode=" + isNameNodeLauncher); Container...
3.68
framework_GridLayout_getComponent
/** * Gets the Component at given index. * * @param x * The column index, starting from 0 for the leftmost column. * @param y * The row index, starting from 0 for the topmost row. * @return Component in given cell or null if empty */ public Component getComponent(int x, int y) { for (E...
3.68
hbase_StochasticLoadBalancer_balanceTable
/** * Given the cluster state this will try and approach an optimal balance. This should always * approach the optimal state given enough steps. */ @Override protected List<RegionPlan> balanceTable(TableName tableName, Map<ServerName, List<RegionInfo>> loadOfOneTable) { // On clusters with lots of HFileLinks or ...
3.68
hadoop_Server_checkServiceDependencies
/** * Checks if all service dependencies of a service are available. * * @param service service to check if all its dependencies are available. * * @throws ServerException thrown if a service dependency is missing. */ protected void checkServiceDependencies(Service service) throws ServerException { if (service....
3.68