name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_ConfigOptions_booleanType | /** Defines that the value of the option should be of {@link Boolean} type. */
public TypedConfigOptionBuilder<Boolean> booleanType() {
return new TypedConfigOptionBuilder<>(key, Boolean.class);
} | 3.68 |
hudi_HoodieMetaSyncOperations_tableExists | /**
* Check if table exists in metastore.
*/
default boolean tableExists(String tableName) {
return false;
} | 3.68 |
morf_SqlScriptExecutor_execute | /**
* @param sqlStatement The SQL statement to execute
* @param parameterMetadata The metadata of the parameters being supplied.
* @param parameterData The values of the parameters.
* @return The number of rows updated/affected by this statement
* @see #execute(String, Connection, Iterable, DataValueLookup)
*/
pu... | 3.68 |
flink_ConfigurationUtils_createConfiguration | /**
* Creates a new {@link Configuration} from the given {@link Properties}.
*
* @param properties to convert into a {@link Configuration}
* @return {@link Configuration} which has been populated by the values of the given {@link
* Properties}
*/
@Nonnull
public static Configuration createConfiguration(Proper... | 3.68 |
zxing_MatrixUtil_maybeEmbedPositionAdjustmentPatterns | // Embed position adjustment patterns if need be.
private static void maybeEmbedPositionAdjustmentPatterns(Version version, ByteMatrix matrix) {
if (version.getVersionNumber() < 2) { // The patterns appear if version >= 2
return;
}
int index = version.getVersionNumber() - 1;
int[] coordinates = POSITION_AD... | 3.68 |
flink_SqlCreateTable_getColumnSqlString | /**
* Returns the projection format of the DDL columns(including computed columns). i.e. the
* following DDL:
*
* <pre>
* create table tbl1(
* col1 int,
* col2 varchar,
* col3 as to_timestamp(col2)
* ) with (
* 'connector' = 'csv'
* )
* </pre>
*
* <p>is equivalent with query "col1, c... | 3.68 |
hadoop_CyclicIteration_remove | /** Not supported */
@Override
public void remove() {
throw new UnsupportedOperationException("Not supported");
} | 3.68 |
druid_CalciteMySqlNodeVisitor_convertToSingleValuesIfNeed | /**
* If there are multiple VALUES, and all values in VALUES CLAUSE are literal,
* convert the value clauses to a single value clause.
*
* @param valuesClauseList
* @return
*/
public static List<SQLInsertStatement.ValuesClause> convertToSingleValuesIfNeed(List<SQLInsertStatement.ValuesClause> valuesClauseList) {
... | 3.68 |
hbase_Result_copyFrom | /**
* Copy another Result into this one. Needed for the old Mapred framework
* @throws UnsupportedOperationException if invoked on instance of EMPTY_RESULT (which is supposed
* to be immutable).
*/
public void copyFrom(Result other) {
checkReadonly();
this.row = null;
thi... | 3.68 |
hadoop_HdfsFileStatus_ecPolicy | /**
* Set the erasure coding policy for this entity (default = null).
* @param ecPolicy Erasure coding policy
* @return This Builder instance
*/
public Builder ecPolicy(ErasureCodingPolicy ecPolicy) {
this.ecPolicy = ecPolicy;
return this;
} | 3.68 |
hudi_QuickstartUtils_generateUpdates | /**
* Generates new updates, randomly distributed across the keys above. There can be duplicates within the returned
* list
*
* @param n Number of updates (including dups)
* @return list of hoodie record updates
*/
public List<HoodieRecord> generateUpdates(Integer n) {
if (numExistingKeys == 0) {
throw new ... | 3.68 |
hbase_TagUtil_asList | /**
* Creates list of tags from given byte array, expected that it is in the expected tag format.
* @param b The byte array
* @param offset The offset in array where tag bytes begin
* @param length Total length of all tags bytes
* @return List of tags
*/
public static List<Tag> asList(byte[] b, int offset, i... | 3.68 |
hadoop_TypedBytesOutput_writeMap | /**
* Writes a map as a typed bytes sequence.
*
* @param map the map to be written
* @throws IOException
*/
@SuppressWarnings("unchecked")
public void writeMap(Map map) throws IOException {
writeMapHeader(map.size());
Set<Entry> entries = map.entrySet();
for (Entry entry : entries) {
write(entry.getKey(... | 3.68 |
rocketmq-connect_HudiSinkTask_start | /**
* Remember always close the CqlSession according to
* https://docs.datastax.com/en/developer/java-driver/4.5/manual/core/
* @param props
*/
@Override
public void start(KeyValue props) {
try {
ConfigUtil.load(props, this.hudiConnectConfig);
log.info("init data source success");
} catch (E... | 3.68 |
flink_HybridShuffleConfiguration_getRegionGroupSizeInBytes | /** Segment size of hybrid spilled file data index. */
public int getRegionGroupSizeInBytes() {
return regionGroupSizeInBytes;
} | 3.68 |
hbase_SequenceIdAccounting_resetHighest | /**
* Reset the accounting of highest sequenceid by regionname.
* @return Return the previous accounting Map of regions to the last sequence id written into
* each.
*/
Map<byte[], Long> resetHighest() {
Map<byte[], Long> old = this.highestSequenceIds;
this.highestSequenceIds = new HashMap<>();
return ... | 3.68 |
pulsar_BrokerService_updateConfigurationAndRegisterListeners | /**
* Update dynamic-ServiceConfiguration with value present into zk-configuration-map and register listeners on
* dynamic-ServiceConfiguration field to take appropriate action on change of zk-configuration-map.
*/
private void updateConfigurationAndRegisterListeners() {
// (1) Dynamic-config value validation: a... | 3.68 |
hadoop_IteratorSelector_setPartition | /**
* Set partition for this iterator selector.
* @param p partition
*/
public void setPartition(String p) {
this.partition = p;
} | 3.68 |
pulsar_KeySharedPolicy_setAllowOutOfOrderDelivery | /**
* If enabled, it will relax the ordering requirement, allowing the broker to send out-of-order messages in case of
* failures. This will make it faster for new consumers to join without being stalled by an existing slow consumer.
*
* <p>In this case, a single consumer will still receive all the keys, but they m... | 3.68 |
hbase_RegionInfo_hasEncodedName | /**
* Does region name contain its encoded name?
* @param regionName region name
* @return boolean indicating if this a new format region name which contains its encoded name.
*/
@InterfaceAudience.Private
static boolean hasEncodedName(final byte[] regionName) {
// check if region name ends in ENC_SEPARATOR
ret... | 3.68 |
hudi_ImmutableTriple_getMiddle | /**
* {@inheritDoc}
*/
@Override
public M getMiddle() {
return middle;
} | 3.68 |
Activiti_DelegateInvocation_getInvocationResult | /**
* @return the result of the invocation (can be null if the invocation does not return a result)
*/
public Object getInvocationResult() {
return invocationResult;
} | 3.68 |
flink_ResourceManager_setFailUnfulfillableRequest | /**
* Set {@link SlotManager} whether to fail unfulfillable slot requests.
*
* @param failUnfulfillableRequest whether to fail unfulfillable requests
*/
protected void setFailUnfulfillableRequest(boolean failUnfulfillableRequest) {
slotManager.setFailUnfulfillableRequest(failUnfulfillableRequest);
} | 3.68 |
hbase_HFileReaderImpl_indexSize | /**
* @return the total heap size of data and meta block indexes in bytes. Does not take into account
* non-root blocks of a multilevel data index.
*/
@Override
public long indexSize() {
return (dataBlockIndexReader != null ? dataBlockIndexReader.heapSize() : 0)
+ ((metaBlockIndexReader != null) ? meta... | 3.68 |
flink_DynamicSourceUtils_isSourceChangeEventsDuplicate | /** Returns true if the table source produces duplicate change events. */
public static boolean isSourceChangeEventsDuplicate(
ResolvedSchema resolvedSchema,
DynamicTableSource tableSource,
TableConfig tableConfig) {
if (!(tableSource instanceof ScanTableSource)) {
return false;
... | 3.68 |
hbase_MasterRpcServices_execProcedureWithRet | /**
* Triggers a synchronous attempt to run a distributed procedure and sets return data in response.
* {@inheritDoc}
*/
@Override
public ExecProcedureResponse execProcedureWithRet(RpcController controller,
ExecProcedureRequest request) throws ServiceException {
rpcPreCheck("execProcedureWithRet");
try {
P... | 3.68 |
framework_VTabsheet_getTooltipInfo | /**
* Returns the tab caption's tooltip info if it has been configured.
*
* @return the tooltip info, or {@code null} if no tooltip configuration
* found
*/
public TooltipInfo getTooltipInfo() {
return tabCaption.getTooltipInfo();
} | 3.68 |
framework_StringToEnumConverter_enumToString | /**
* Converts the given enum to a human readable string using the given
* locale.
* <p>
* Compatible with {@link #stringToEnum(String, Class, Locale)}
*
* @param value
* The enum value to convert
* @param locale
* The locale to use for conversion. If null, the JVM default
* l... | 3.68 |
flink_RowTimeIntervalJoin_getMaxOutputDelay | /**
* Get the maximum interval between receiving a row and emitting it (as part of a joined
* result). This is the time interval by which watermarks need to be held back.
*
* @return the maximum delay for the outputs
*/
public long getMaxOutputDelay() {
return Math.max(leftRelativeSize, rightRelativeSize) + al... | 3.68 |
dubbo_AdaptiveClassCodeGenerator_getMethodAdaptiveValue | /**
* get value of adaptive annotation or if empty return splitted simple name
*/
private String[] getMethodAdaptiveValue(Adaptive adaptiveAnnotation) {
String[] value = adaptiveAnnotation.value();
// value is not set, use the value generated from class name as the key
if (value.length == 0) {
Str... | 3.68 |
flink_UnsortedGrouping_withPartitioner | /**
* Uses a custom partitioner for the grouping.
*
* @param partitioner The custom partitioner.
* @return The grouping object itself, to allow for method chaining.
*/
public UnsortedGrouping<T> withPartitioner(Partitioner<?> partitioner) {
Preconditions.checkNotNull(partitioner);
getKeys().validateCustomP... | 3.68 |
hudi_HoodieCombineHiveInputFormat_getPath | /**
* Returns the i<sup>th</sup> Path.
*/
@Override
public Path getPath(int i) {
return inputSplitShim.getPath(i);
} | 3.68 |
querydsl_SQLTemplates_serializeUpdate | /**
* template method for UPDATE serialization
*
* @param metadata
* @param entity
* @param updates
* @param context
*/
public void serializeUpdate(QueryMetadata metadata, RelationalPath<?> entity,
Map<Path<?>, Expression<?>> updates, SQLSerializer context) {
context.serializeForUpdate(metadata, enti... | 3.68 |
hbase_ProcedureExecutor_nextProcId | // ==========================================================================
// Procedure IDs helpers
// ==========================================================================
private long nextProcId() {
long procId = lastProcId.incrementAndGet();
if (procId < 0) {
while (!lastProcId.compareAndSet(procId, ... | 3.68 |
hbase_TableMapReduceUtil_resetCacheConfig | /**
* Enable a basic on-heap cache for these jobs. Any BlockCache implementation based on direct
* memory will likely cause the map tasks to OOM when opening the region. This is done here
* instead of in TableSnapshotRegionRecordReader in case an advanced user wants to override this
* behavior in their job.
*/
pub... | 3.68 |
hbase_MultiVersionConcurrencyControl_completeAndWait | /**
* Complete a {@link WriteEntry} that was created by {@link #begin()} then wait until the read
* point catches up to our write. At the end of this call, the global read point is at least as
* large as the write point of the passed in WriteEntry. Thus, the write is visible to MVCC
* readers.
*/
public void compl... | 3.68 |
hbase_VersionModel_setOSVersion | /**
* @param version the OS version string
*/
public void setOSVersion(String version) {
this.osVersion = version;
} | 3.68 |
framework_BindingValidationStatus_getResult | /**
* Gets the validation result if status is either {@link Status#OK} or
* {@link Status#ERROR} or an empty optional if status is
* {@link Status#UNRESOLVED}.
*
* @return the validation result
*/
public Optional<ValidationResult> getResult() {
if (result == null) {
return Optional.empty();
}
... | 3.68 |
hbase_MobFileName_getStartKeyFromName | /**
* get startKey from MobFileName.
* @param fileName file name.
*/
public static String getStartKeyFromName(final String fileName) {
return fileName.substring(0, STARTKEY_END_INDEX);
} | 3.68 |
framework_VSlider_getNavigationDownKey | /**
* Get the key that decreases the vertical slider. By default it is the down
* arrow key but by overriding this you can change the key to whatever you
* want.
*
* @return The keycode of the key
*/
protected int getNavigationDownKey() {
return KeyCodes.KEY_DOWN;
} | 3.68 |
framework_Tree_expandItemsRecursively | /**
* Expands the items recursively
*
* Expands all the children recursively starting from an item. Operation
* succeeds only if all expandable items are expanded.
*
* @param startItemId
* ID of the initial item
* @return True if the expand operation succeeded
*/
public boolean expandItemsRecursivel... | 3.68 |
hbase_ByteBufferListOutputStream_releaseResources | /**
* Release the resources it uses (The ByteBuffers) which are obtained from pool. Call this only
* when all the data is fully used. And it must be called at the end of usage else we will leak
* ByteBuffers from pool.
*/
public void releaseResources() {
try {
close();
} catch (IOException e) {
LOG.debu... | 3.68 |
hadoop_ApplicationServiceRecordProcessor_createSRVInfo | /**
* Create an application SRV record descriptor.
*
* @param serviceRecord the service record.
* @throws Exception if there is an issue during descriptor creation.
*/
protected void createSRVInfo(ServiceRecord serviceRecord) throws Exception {
List<Endpoint> endpoints = serviceRecord.external;
List<RecordDesc... | 3.68 |
AreaShop_RegionGroup_getLowerCaseName | /**
* Get the lowercase name of the group (used for getting the config etc).
* @return The name of the group in lowercase
*/
public String getLowerCaseName() {
return getName().toLowerCase();
} | 3.68 |
hbase_Result_containsEmptyColumn | /**
* Checks if the specified column contains an empty value (a zero-length byte array).
* @param family family name
* @param foffset family offset
* @param flength family length
* @param qualifier column qualifier
* @param qoffset qualifier offset
* @param qlength qualifier length
* @return whether ... | 3.68 |
hbase_VersionInfoUtil_getVersionComponents | /**
* Returns the version components Examples: "1.4.3" returns [1, 4, 3], "4.5.6-SNAPSHOT" returns
* [4, 5, 6, "SNAPSHOT"]
* @return the components of the version string
*/
private static String[] getVersionComponents(final HBaseProtos.VersionInfo versionInfo) {
return versionInfo.getVersion().split("[\\.-]");
} | 3.68 |
dubbo_MetadataService_toSortedStrings | /**
* Convert the specified {@link Stream} of {@link URL URLs} to be the {@link URL#toFullString() strings} presenting
* the {@link URL URLs}
*
* @param stream {@link Stream} of {@link URL}
* @return the non-null read-only {@link SortedSet sorted set} of {@link URL#toFullString() strings} presenting
* @see URL#to... | 3.68 |
hudi_FlinkClusteringConfig_toFlinkConfig | /**
* Transforms a {@code FlinkClusteringConfig.config} into {@code Configuration}.
* The latter is more suitable for the table APIs. It reads all the properties
* in the properties file (set by `--props` option) and cmd line options
* (set by `--hoodie-conf` option).
*/
public static Configuration toFlinkConfig(F... | 3.68 |
hadoop_CacheStats_getCacheUsed | /**
* Get the approximate amount of cache space used.
*/
public long getCacheUsed() {
return usedBytesCount.get();
} | 3.68 |
framework_VAbstractCalendarPanel_setAssistiveLabelNextYear | /**
* Set assistive label for the next year element.
*
* @param label
* the label to set
* @since 8.4
*/
public void setAssistiveLabelNextYear(String label) {
nextYearAssistiveLabel = label;
} | 3.68 |
morf_DatabaseSchemaManager_invalidateCache | /**
* Invalidate the cache of database tables. Use when the schema has changed underneath this schema manager.
*/
public final void invalidateCache() {
if (log.isDebugEnabled()) {
StackTraceElement stack = new Throwable().getStackTrace()[1];
log.debug("Cache invalidated at " + stack.getClassName() + "." + s... | 3.68 |
hbase_KeyValue_checkParameters | /**
* Checks the parameters passed to a constructor.
* @param row row key
* @param rlength row length
* @param family family name
* @param flength family length
* @param qlength qualifier length
* @param vlength value length
* @throws IllegalArgumentException an illegal value was passed
*/
static void che... | 3.68 |
framework_HierarchyMapper_fetchItems | /**
* Gets a stream of children for the given item in the form of a flattened
* hierarchy from the back-end and filter the wanted results from the list.
*
* @param parent
* the parent item for the fetch
* @param range
* the requested item range
* @return the stream of items
*/
public Stre... | 3.68 |
graphhopper_Distributions_logNormalDistribution | /**
* Use this function instead of Math.log(normalDistribution(sigma, x)) to avoid an
* arithmetic underflow for very small probabilities.
*/
public static double logNormalDistribution(double sigma, double x) {
return Math.log(1.0 / (sqrt(2.0 * PI) * sigma)) + (-0.5 * pow(x / sigma, 2));
} | 3.68 |
hadoop_StorageStatistics_getScheme | /**
* @return the associated file system scheme if this is scheme specific,
* else return null.
*/
public String getScheme() {
return null;
} | 3.68 |
framework_Escalator_getRowTop | /**
* <em>Calculates</em> the correct top position of a row at a logical
* index, regardless if there is one there or not.
* <p>
* A correct result requires that both {@link #getDefaultRowHeight()} is
* consistent, and the placement and height of all spacers above the
* given logical index are consistent.
*
* @... | 3.68 |
streampipes_OpcUaUtil_retrieveDataTypesFromServer | /**
* connects to each node individually and updates the data type in accordance to the data from the server.
*
* @param opcNodes List of opcNodes where the data type is not determined appropriately
*/
public static void retrieveDataTypesFromServer(OpcUaClient client, List<OpcNode> opcNodes) throws AdapterException... | 3.68 |
framework_ContainerOrderedWrapper_lastItemId | /*
* Gets the last item stored in the ordered container Don't add a JavaDoc
* comment here, we use the default documentation from implemented
* interface.
*/
@Override
public Object lastItemId() {
if (ordered) {
return ((Container.Ordered) container).lastItemId();
}
return last;
} | 3.68 |
hadoop_Check_gt0 | /**
* Verifies an long is greater than zero.
*
* @param value long value.
* @param name the name to use in the exception message.
*
* @return the value.
*
* @throws IllegalArgumentException if the long is zero or less.
*/
public static long gt0(long value, String name) {
if (value <= 0) {
throw new Illeg... | 3.68 |
flink_ZooKeeperUtils_createLeaderRetrievalDriverFactory | /**
* Creates a {@link LeaderRetrievalDriverFactory} implemented by ZooKeeper.
*
* @param client The {@link CuratorFramework} ZooKeeper client to use
* @param path The path for the leader zNode
* @param configuration configuration for further config options
* @return {@link LeaderRetrievalDriverFactory} instance.... | 3.68 |
framework_Slider_getMax | /**
* Gets the maximum slider value. The default value is 100.0.
*
* @return the largest value the slider can have
*/
public double getMax() {
return getState(false).maxValue;
} | 3.68 |
morf_XmlDataSetProducer_getUpperCaseName | /**
* @see org.alfasoftware.morf.metadata.Column#getUpperCaseName()
*/
@Override
public String getUpperCaseName() {
return upperCaseColumnName.get();
} | 3.68 |
hbase_MobUtils_getQualifiedMobRootDir | /**
* Gets the qualified root dir of the mob files.
* @param conf The current configuration.
* @return The qualified root dir.
*/
public static Path getQualifiedMobRootDir(Configuration conf) throws IOException {
Path hbaseDir = new Path(conf.get(HConstants.HBASE_DIR));
Path mobRootDir = new Path(hbaseDir, MobC... | 3.68 |
hbase_ReplicationSourceShipper_shipEdits | /**
* Do the shipping logic
*/
private void shipEdits(WALEntryBatch entryBatch) {
List<Entry> entries = entryBatch.getWalEntries();
int sleepMultiplier = 0;
if (entries.isEmpty()) {
updateLogPosition(entryBatch);
return;
}
int currentSize = (int) entryBatch.getHeapSize();
source.getSourceMetrics()... | 3.68 |
hadoop_FederationStateStoreUtils_filterHomeSubCluster | /**
* Filter HomeSubCluster based on Filter SubCluster.
*
* @param filterSubCluster filter query conditions
* @param homeSubCluster homeSubCluster
* @return return true, if match filter conditions,
* return false, if not match filter conditions.
*/
public static boolean filterHomeSubCluster(SubClusterId ... | 3.68 |
framework_AbstractDateFieldElement_getISOValue | /**
* Gets the value of the date field as a ISO8601 compatible string
* (yyyy-MM-dd or yyyy-MM-dd'T'HH:mm:ss depending on whether the element
* supports time).
*
* @return the date in ISO-8601 format
* @since 8.1.0
*/
protected String getISOValue() {
return (String) getCommandExecutor()
.executeS... | 3.68 |
morf_H2Dialect_getSqlForYYYYMMDDToDate | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForYYYYMMDDToDate(org.alfasoftware.morf.sql.element.Function)
*/
@Override
protected String getSqlForYYYYMMDDToDate(Function function) {
AliasedField field = function.getArguments().get(0);
return "CAST(SUBSTRING(" + getSqlFrom(field) + ", 1, 4)||'-'||SUBSTRI... | 3.68 |
incubator-hugegraph-toolchain_JDBCVendor_buildGteClauseInCombined | /**
* For database which support to select by where (a, b, c) >= (va, vb, vc)
*/
public String buildGteClauseInCombined(Line nextStartRow) {
E.checkNotNull(nextStartRow, "nextStartRow");
StringBuilder builder = new StringBuilder();
String[] names = nextStartRow.names();
Object[] values = nextStartRow.... | 3.68 |
flink_CoGroupOperator_sortSecondGroup | /**
* Sorts Pojo or {@link org.apache.flink.api.java.tuple.Tuple} elements within a
* group in the second input on the specified field in the specified {@link Order}.
*
* <p>Groups can be sorted by multiple fields by chaining {@link
* #sortSecondGroup(String, Order)} calls.
*
* @param fieldExpression The express... | 3.68 |
hadoop_AuditReplayThread_getException | /**
* Get the Exception that caused this thread to stop running, if any, else
* null. Should not be called until this thread has already completed (i.e.,
* after {@link #join()} has been called).
*
* @return The exception which was thrown, if any.
*/
Exception getException() {
return exception;
} | 3.68 |
hbase_BufferedMutator_disableWriteBufferPeriodicFlush | /**
* Disable periodic flushing of the write buffer.
*/
default void disableWriteBufferPeriodicFlush() {
setWriteBufferPeriodicFlush(0, MIN_WRITE_BUFFER_PERIODIC_FLUSH_TIMERTICK_MS);
} | 3.68 |
hudi_StreamerUtil_getTimeGeneratorConfig | /**
* Returns the timeGenerator config with given configuration.
*/
public static HoodieTimeGeneratorConfig getTimeGeneratorConfig(Configuration conf) {
TypedProperties properties = flinkConf2TypedProperties(conf);
// Set lock configure, which is needed in TimeGenerator.
Option<HoodieLockConfig> lockConfig = ge... | 3.68 |
hadoop_FileStatusAcceptor_accept | /**
* Accept all prefixes except the one for the base path, "self".
* @param keyPath qualified path to the entry
* @param prefix common prefix in listing.
* @return true if the entry is accepted (i.e. that a status entry
* should be generated.
*/
@Override
public boolean accept(Path keyPath, String prefix) {
re... | 3.68 |
hbase_AnnotationReadingPriorityFunction_getPriority | /**
* Returns a 'priority' based on the request type.
* <p/>
* Currently the returned priority is used for queue selection.
* <p/>
* See the {@code SimpleRpcScheduler} as example. It maintains a queue per 'priority type':
* <ul>
* <li>HIGH_QOS (meta requests)</li>
* <li>REPLICATION_QOS (replication requests)</l... | 3.68 |
hbase_HMaster_getMasterActiveTime | /** Returns timestamp in millis when HMaster became the active master. */
public long getMasterActiveTime() {
return masterActiveTime;
} | 3.68 |
pulsar_ProducerInterceptor_onPartitionsChange | /**
* This method is called when partitions of the topic (partitioned-topic) changes.
*
* @param topicName topic name
* @param partitions new updated partitions
*/
default void onPartitionsChange(String topicName, int partitions) {
} | 3.68 |
framework_EventCellReference_isFooter | /**
* Is the cell reference for a cell in the footer of the Grid.
*
* @since 7.5
* @return <code>true</code> if referenced cell is in the footer,
* <code>false</code> if not
*/
public boolean isFooter() {
return section == Section.FOOTER;
} | 3.68 |
morf_Function_least | /**
* Helper method to create an instance of the "least" SQL function.
*
* @param fields the fields to evaluate.
* @return an instance of the "least" function.
*/
public static Function least(Iterable<? extends AliasedField> fields) {
return new Function(FunctionType.LEAST, fields);
} | 3.68 |
hibernate-validator_ClassVisitor_visitTypeAsClass | /**
* Doesn't perform any checks at the moment but calls a visit methods on its own elements.
*
* @param element a class element to check
* @param aVoid
*/
@Override
public Void visitTypeAsClass(TypeElement element, Void aVoid) {
visitAllMyElements( element );
return null;
} | 3.68 |
hadoop_CommitContext_abortSingleCommit | /**
* See {@link CommitOperations#abortSingleCommit(SinglePendingCommit)}.
* @param commit pending commit to abort
* @throws FileNotFoundException if the abort ID is unknown
* @throws IOException on any failure
*/
public void abortSingleCommit(final SinglePendingCommit commit)
throws IOException {
commitOper... | 3.68 |
querydsl_JTSCurveExpression_isClosed | /**
* Returns 1 (TRUE) if this Curve is closed [StartPoint ( ) = EndPoint ( )].
*
* @return closed
*/
public BooleanExpression isClosed() {
if (closed == null) {
closed = Expressions.booleanOperation(SpatialOps.IS_CLOSED, mixin);
}
return closed;
} | 3.68 |
dubbo_DubboBeanUtils_registerPlaceholderConfigurerBeanIfNotExists | /**
* Register a placeholder configurer beans if not exists.
* Call this method in BeanDefinitionRegistryPostProcessor,
* in order to enable the registered BeanFactoryPostProcessor bean to be loaded and executed.
*
* @param beanFactory
* @param registry
* @see DubboInfraBeanRegisterPostProcessor
* @see org.spri... | 3.68 |
hibernate-validator_AnnotationTypeMemberCheck_checkGroupsAttribute | /**
* Checks that the given type element
* <p/>
* <ul>
* <li>has a method with name "groups",</li>
* <li>the return type of this method is {@code Class<?>[]},</li>
* <li>the default value of this method is {@code {}}.</li>
* </ul>
*
* @param element The element of interest.
*
* @return A possibly non-e... | 3.68 |
shardingsphere-elasticjob_JobAPIFactory_createShardingStatisticsAPI | /**
* Create sharding statistics API.
*
* @param connectString registry center connect string
* @param namespace registry center namespace
* @param digest registry center digest
* @return job sharding statistics API
*/
public static ShardingStatisticsAPI createShardingStatisticsAPI(final String connectString, fi... | 3.68 |
flink_CopyOnWriteStateMap_putEntry | /** Helper method that is the basis for operations that add mappings. */
private StateMapEntry<K, N, S> putEntry(K key, N namespace) {
final int hash = computeHashForOperationAndDoIncrementalRehash(key, namespace);
final StateMapEntry<K, N, S>[] tab = selectActiveTable(hash);
int index = hash & (tab.length... | 3.68 |
open-banking-gateway_FintechRegistrar_registerFintech | /**
* Register Fintech in the OBG database.
* @param fintechId Fintech ID to register
* @param finTechPassword Fintechs' KeyStore password
* @return Newly created FinTech
*/
@Transactional
public Fintech registerFintech(String fintechId, Supplier<char[]> finTechPassword) {
Fintech fintech = fintechRepository.s... | 3.68 |
framework_FilesystemContainer_getChildren | /*
* Gets the ID's of all Items who are children of the specified Item. Don't
* add a JavaDoc comment here, we use the default documentation from
* implemented interface.
*/
@Override
public Collection<File> getChildren(Object itemId) {
if (!(itemId instanceof File)) {
return Collections.unmodifiableCo... | 3.68 |
hadoop_PageBlobFormatHelpers_toShort | /**
* Retrieves a short from the given two bytes.
*/
public static short toShort(byte firstByte, byte secondByte) {
return ByteBuffer.wrap(new byte[] { firstByte, secondByte })
.getShort();
} | 3.68 |
morf_MySqlDialect_alterTableDropColumnStatements | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#alterTableDropColumnStatements(org.alfasoftware.morf.metadata.Table, org.alfasoftware.morf.metadata.Column)
*/
@Override
public Collection<String> alterTableDropColumnStatements(Table table, Column column) {
List<String> result = new ArrayList<>();
StringBuilder s... | 3.68 |
hbase_ScannerModel_setMaxVersions | /**
* @param maxVersions maximum number of versions to return
*/
public void setMaxVersions(int maxVersions) {
this.maxVersions = maxVersions;
} | 3.68 |
hudi_InternalSchemaChangeApplier_applyColumnTypeChange | /**
* Update col type for hudi table.
*
* @param colName col name to be changed. if we want to change col from a nested filed, the fullName should be specify
* @param newType .
*/
public InternalSchema applyColumnTypeChange(String colName, Type newType) {
TableChanges.ColumnUpdateChange updateChange = TableChang... | 3.68 |
hbase_SaslServerAuthenticationProviders_getSimpleProvider | /**
* Extracts the SIMPLE authentication provider.
*/
public SaslServerAuthenticationProvider getSimpleProvider() {
Optional<SaslServerAuthenticationProvider> opt = providers.values().stream()
.filter((p) -> p instanceof SimpleSaslServerAuthenticationProvider).findFirst();
if (!opt.isPresent()) {
throw ne... | 3.68 |
hadoop_HsCountersPage_postHead | /*
* (non-Javadoc)
* @see org.apache.hadoop.yarn.webapp.view.TwoColumnLayout#postHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML)
*/
@Override protected void postHead(Page.HTML<__> html) {
html.
style("#counters, .dt-counters { table-layout: fixed }",
"#counters th { overflow: hidden; vertical-... | 3.68 |
morf_DatabaseMetaDataProvider_loadAllViewNames | /**
* Creates a map of all view names,
* indexed by their case-agnostic names.
*
* @return Map of real view names.
*/
protected Map<AName, RealName> loadAllViewNames() {
final ImmutableMap.Builder<AName, RealName> viewNameMappings = ImmutableMap.builder();
try {
final DatabaseMetaData databaseMetaData = c... | 3.68 |
hbase_ParseFilter_convertByteArrayToBoolean | /**
* Converts a boolean expressed in a byte array to an actual boolean
* <p>
* This doesn't used Bytes.toBoolean because Bytes.toBoolean(byte []) assumes that 1 stands for
* true and 0 for false. Here, the byte array representing "true" and "false" is parsed
* <p>
* @param booleanAsByteArray the boolean value ex... | 3.68 |
hadoop_ClientThrottlingIntercept_errorReceivingResponse | /**
* Called when a network error occurs before the HTTP status and response
* headers are received. Client-side throttling uses this to collect metrics.
*
* @param event The connection, operation, and request state.
*/
public static void errorReceivingResponse(ErrorReceivingResponseEvent event) {
updateMetrics(... | 3.68 |
querydsl_SurfaceExpression_centroid | /**
* The mathematical centroid for this Surface as a Point. The result is not guaranteed to
* be on this Surface.
*
* @return centroid
*/
public PointExpression<Point> centroid() {
if (centroid == null) {
centroid = GeometryExpressions.pointOperation(SpatialOps.CENTROID, mixin);
}
return centr... | 3.68 |
framework_VAbstractTextualDate_setISODate | /**
* Sets the value of the date field as a locale independent ISO date
* (yyyy-MM-dd'T'HH:mm:ss or yyyy-MM-dd depending on whether this is a date
* field or a date and time field).
*
* @param isoDate
* the date to set in ISO8601 format, or null to clear the date
* value
* @since 8.1
*/
p... | 3.68 |
hbase_HRegion_rewriteCellTags | /**
* Possibly rewrite incoming cell tags.
*/
private void rewriteCellTags(Map<byte[], List<Cell>> familyMap, final Mutation m) {
// Check if we have any work to do and early out otherwise
// Update these checks as more logic is added here
if (m.getTTL() == Long.MAX_VALUE) {
return;
}
// From this poin... | 3.68 |
morf_AbstractSqlDialectTest_testAddStringColumn | /**
* Test adding a string column.
*/
@Test
public void testAddStringColumn() {
testAlterTableColumn(AlterationType.ADD, column("stringField_new", DataType.STRING, 6).nullable(), expectedAlterTableAddStringColumnStatement());
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.