name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
morf_SelectStatementBuilder_build | /**
* Builds the select statement.
*/
@Override
public SelectStatement build() {
return new SelectStatement(this);
} | 3.68 |
hmily_HmilySafeNumberOperationUtils_safeContains | /**
* Execute range contains method by safe mode.
*
* @param range range
* @param endpoint endpoint
* @return whether the endpoint is included in the range
*/
public static boolean safeContains(final Range<Comparable<?>> range, final Comparable<?> endpoint) {
try {
return range.contains(endpoint);
... | 3.68 |
querydsl_BooleanExpression_andAnyOf | /**
* Create a {@code this && any(predicates)} expression
*
* <p>Returns an intersection of this and the union of the given predicates</p>
*
* @param predicates union of predicates
* @return this && any(predicates)
*/
public BooleanExpression andAnyOf(Predicate... predicates) {
return and(ExpressionU... | 3.68 |
framework_AbstractClientConnector_equals | /*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
/*
* This equals method must return true when we're comparing an object to
* its proxy. This happens a lot with CDI (and possibly Spr... | 3.68 |
hadoop_LocalityMulticastAMRMProxyPolicy_chooseSubClusterIdForMaxLoadSC | /**
* Check if the current target subcluster is over max load, and if it is
* reroute it.
*
* @param targetId the original target subcluster id
* @param maxThreshold the max load threshold to reroute
* @param activeAndEnabledSCs the list of active and enabled subclusters
* @return targetId if i... | 3.68 |
morf_DataSetUtils_record | /**
* Build a record.
*
* @see RecordBuilder
* @return A {@link RecordBuilder}.
*/
public static RecordBuilder record() {
return new RecordBuilderImpl();
} | 3.68 |
flink_TableChange_getValue | /** Returns the Option value to set. */
public String getValue() {
return value;
} | 3.68 |
hbase_MergeTableRegionsProcedure_createMergedRegion | /**
* Create merged region. The way the merge works is that we make a 'merges' temporary directory in
* the FIRST parent region to merge (Do not change this without also changing the rollback where
* we look in this FIRST region for the merge dir). We then collect here references to all the
* store files in all the... | 3.68 |
flink_RocksDBNativeMetricMonitor_setProperty | /** Updates the value of metricView if the reference is still valid. */
private void setProperty(RocksDBNativePropertyMetricView metricView) {
if (metricView.isClosed()) {
return;
}
try {
synchronized (lock) {
if (rocksDB != null) {
long value = rocksDB.getLongPro... | 3.68 |
morf_AbstractSqlDialectTest_testGreatest | /**
* Test the GREATEST functionality behaves as expected
*/
@Test
public void testGreatest() {
SelectStatement testStatement = select(greatest(new NullFieldLiteral(), field("bob"))).from(tableRef("MyTable"));
assertEquals(expectedGreatest().toLowerCase(), testDialect.convertStatementToSQL(testStatement).toLowerC... | 3.68 |
flink_FixedLengthRecordSorter_writeToOutput | /**
* Writes a subset of the records in this buffer in their logical order to the given output.
*
* @param output The output view to write the records to.
* @param start The logical start position of the subset.
* @param num The number of elements to write.
* @throws IOException Thrown, if an I/O exception occurr... | 3.68 |
hbase_DefaultMobStoreFlusher_performMobFlush | /**
* Flushes the cells in the mob store.
* <ol>
* In the mob store, the cells with PUT type might have or have no mob tags.
* <li>If a cell does not have a mob tag, flushing the cell to different files depends on the
* value length. If the length is larger than a threshold, it's flushed to a mob file and the mob
... | 3.68 |
pulsar_AbstractMetadataStore_execute | /**
* Run the task in the executor thread and fail the future if the executor is shutting down.
*/
@VisibleForTesting
public void execute(Runnable task, Supplier<List<CompletableFuture<?>>> futures) {
try {
executor.execute(task);
} catch (final Throwable t) {
futures.get().forEach(f -> f.comp... | 3.68 |
flink_SingleInputPlanNode_getComparator | /**
* Gets the specified comparator from this PlanNode.
*
* @param id The ID of the requested comparator.
* @return The specified comparator.
*/
public TypeComparatorFactory<?> getComparator(int id) {
return comparators[id];
} | 3.68 |
framework_SizeWithUnit_parseStringSize | /**
* Returns an object whose numeric value and unit are taken from the string
* s. Null or empty string will produce {-1,Unit#PIXELS}. An exception is
* thrown if s specifies a number without a unit.
*
* @param s
* the string to be parsed
* @return an object containing the parsed value and unit
*/
p... | 3.68 |
framework_AbstractMultiSelectConnector_onDataChange | /**
* This method handles the parsing of the new JSON data containing the items
* and the selection information.
*
* @param range
* the updated range, never {@code null}
*/
protected void onDataChange(Range range) {
assert range.getStart() == 0
&& range.getEnd() == getDataSource().size(... | 3.68 |
hbase_HFileWriterImpl_finishBlock | /** Clean up the data block that is currently being written. */
private void finishBlock() throws IOException {
if (!blockWriter.isWriting() || blockWriter.blockSizeWritten() == 0) {
return;
}
// Update the first data block offset if UNSET; used scanning.
if (firstDataBlockOffset == UNSET) {
firstDataB... | 3.68 |
hbase_NettyRpcClientConfigHelper_setEventLoopConfig | /**
* Set the EventLoopGroup and channel class for {@code AsyncRpcClient}.
*/
public static void setEventLoopConfig(Configuration conf, EventLoopGroup group,
Class<? extends Channel> channelClass) {
Preconditions.checkNotNull(group, "group is null");
Preconditions.checkNotNull(channelClass, "channel class is nu... | 3.68 |
morf_InsertStatementBuilder_values | /**
* Specifies the literal field values to insert.
*
* <p>
* Each field must have an alias which specifies the column to insert into.
* </p>
*
* @see AliasedField#as(String)
* @param fieldValues Literal field values to insert.
* @return this, for method chaining.
*/
public InsertStatementBuilder values(Alias... | 3.68 |
flink_FlinkContainersSettings_setLogProperty | /**
* Sets a single Flink logging configuration property in the log4j format and returns a
* reference to this Builder enabling method chaining.
*
* @param key The property key.
* @param value The property value.
* @return A reference to this Builder.
*/
public Builder setLogProperty(String key, String value) {
... | 3.68 |
hadoop_IntegerSplitter_split | /**
* Returns a list of longs one element longer than the list of input splits.
* This represents the boundaries between input splits.
* All splits are open on the top end, except the last one.
*
* So the list [0, 5, 8, 12, 18] would represent splits capturing the intervals:
*
* [0, 5)
* [5, 8)
* [8, 12)
* [1... | 3.68 |
framework_VFlash_setCodebase | /**
* This attribute specifies the base path used to resolve relative URIs
* specified by the classid, data, and archive attributes. The default value
* is the base URI of the current document.
*
* @param codebase
* The base path
*
* @see #setClassId(String)
* @see #setArchive(String)
*/
public voi... | 3.68 |
hbase_RegionInfoDisplay_getDescriptiveNameFromRegionStateForDisplay | /**
* Get the descriptive name as {@link RegionState} does it but with hidden startkey optionally
* @return descriptive string
*/
public static String getDescriptiveNameFromRegionStateForDisplay(RegionState state,
Configuration conf) {
if (conf.getBoolean(DISPLAY_KEYS_KEY, true)) return state.toDescriptiveString... | 3.68 |
hbase_SegmentScanner_getHighest | /**
* Private internal method that returns the higher of the two key values, or null if they are both
* null
*/
private Cell getHighest(Cell first, Cell second) {
if (first == null && second == null) {
return null;
}
if (first != null && second != null) {
int compare = segment.compare(first, second);
... | 3.68 |
hbase_HBaseServiceHandler_getAdmin | /**
* Obtain HBaseAdmin. Creates the instance if it is not already created.
*/
protected Admin getAdmin() throws IOException {
return connectionCache.getAdmin();
} | 3.68 |
graphhopper_VectorTile_hasType | /**
* <pre>
* The type of geometry stored in this feature.
* </pre>
*
* <code>optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN];</code>
*/
public boolean hasType() {
return ((bitField0_ & 0x00000004) == 0x00000004);
} | 3.68 |
hbase_HFileArchiveManager_getTableNode | /**
* Get the zookeeper node associated with archiving the given table
* @param table name of the table to check
* @return znode for the table's archive status
*/
private String getTableNode(byte[] table) {
return ZNodePaths.joinZNode(archiveZnode, Bytes.toString(table));
} | 3.68 |
framework_DDEventHandleStrategy_handleDragImageEvent | /**
* Handles event when drag image element (
* {@link VDragAndDropManager#getDragElement()} return value) is not null or
* {@code event} is touch event.
*
* If method returns {@code true} then event processing will be stoped.
*
* @param target
* target element over which DnD event has happened
* @p... | 3.68 |
flink_PojoSerializerSnapshot_getCompatibilityOfPreExistingRegisteredSubclasses | /**
* Finds which registered subclasses exists both in the new {@link PojoSerializer} as well as in
* the previous one (represented by this snapshot), and returns an {@link
* IntermediateCompatibilityResult} of the serializers of this preexisting registered
* subclasses.
*/
private static <T>
IntermediateC... | 3.68 |
flink_ResolvedSchema_getColumnDataTypes | /**
* Returns all column data types. It does not distinguish between different kinds of columns.
*/
public List<DataType> getColumnDataTypes() {
return columns.stream().map(Column::getDataType).collect(Collectors.toList());
} | 3.68 |
hbase_KeyValue_getRowArray | /**
* Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
*/
@Override
public byte[] getRowArray() {
return bytes;
} | 3.68 |
framework_AbstractComponent_hasEqualWidth | /**
* Test if the given component has equal width with this instance
*
* @param component
* the component for the width comparison
* @return true if the widths are equal
*/
private boolean hasEqualWidth(Component component) {
return getWidth() == component.getWidth()
&& getWidthUnits().... | 3.68 |
hbase_Bytes_split | /**
* Split passed range. Expensive operation relatively. Uses BigInteger math. Useful splitting
* ranges for MapReduce jobs.
* @param a Beginning of range
* @param b End of range
* @param inclusive Whether the end of range is prefix-inclusive or is considered an exclusive
* bound... | 3.68 |
querydsl_SQLTemplates_serializeModifiers | /**
* template method for LIMIT and OFFSET serialization
*
* @param metadata
* @param context
*/
protected void serializeModifiers(QueryMetadata metadata, SQLSerializer context) {
QueryModifiers mod = metadata.getModifiers();
if (mod.getLimit() != null) {
context.handle(limitTemplate, mod.getLimit(... | 3.68 |
flink_StreamProjection_projectTuple14 | /**
* Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
*
* @return The projected DataStream.
* @see Tuple
* @see DataStream
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
SingleOutputStreamOperator<
Tuple14<T0, T1, T2, T3, T4, T... | 3.68 |
morf_InsertStatement_getFieldDefaults | /**
* Gets the field defaults that should be used when inserting new fields.
*
* @return a map of field names to field default values to use during this insert.
*/
public Map<String, AliasedField> getFieldDefaults() {
return fieldDefaults;
} | 3.68 |
hbase_ByteBuff_toBytes | /**
* Copy the content from this ByteBuff to a byte[].
*/
public byte[] toBytes() {
return toBytes(0, this.limit());
} | 3.68 |
querydsl_TimeExpression_milliSecond | /**
* Create a milliseconds expression (range 0-999)
* <p>Is always 0 in JPA and JDO modules</p>
*
* @return milli second
*/
public NumberExpression<Integer> milliSecond() {
if (milliseconds == null) {
milliseconds = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.MILLISECOND, mixin);
}
... | 3.68 |
morf_SelectStatementBuilder_forUpdate | /**
* Tells the database to pessimistically lock the tables.
*
* @return this, for method chaining.
*/
public SelectStatementBuilder forUpdate() {
this.forUpdate = true;
return this;
} | 3.68 |
hbase_RequestConverter_buildGetSpaceQuotaRegionSizesRequest | /**
* Returns a {@link GetSpaceQuotaRegionSizesRequest} object.
*/
public static GetSpaceQuotaRegionSizesRequest buildGetSpaceQuotaRegionSizesRequest() {
return GetSpaceQuotaRegionSizesRequest.getDefaultInstance();
} | 3.68 |
flink_NFA_extractCurrentMatches | /**
* Extracts all the sequences of events from the start to the given computation state. An event
* sequence is returned as a map which contains the events and the names of the states to which
* the events were mapped.
*
* @param sharedBufferAccessor The accessor to {@link SharedBuffer} from which to extract the
... | 3.68 |
hbase_HFile_getSupportedCompressionAlgorithms | /**
* Get names of supported compression algorithms. The names are acceptable by HFile.Writer.
* @return Array of strings, each represents a supported compression algorithm. Currently, the
* following compression algorithms are supported.
* <ul>
* <li>"none" - No compression.
* <li... | 3.68 |
streampipes_PipelineElementMigrationManager_migratePipelineElement | /**
* Handle the migration of a pipeline element with respect to the given model migration configs.
* All applicable migrations found in the provided configs are executed for the given pipeline element.
* In case a migration fails, the related pipeline element receives the latest definition of its static properties,... | 3.68 |
hudi_HoodieAvroUtils_jsonBytesToAvro | /**
* Convert json bytes back into avro record.
*/
public static GenericRecord jsonBytesToAvro(byte[] bytes, Schema schema) throws IOException {
ByteArrayInputStream bio = new ByteArrayInputStream(bytes);
JsonDecoder jsonDecoder = DecoderFactory.get().jsonDecoder(schema, bio);
GenericDatumReader<GenericRecord> ... | 3.68 |
dubbo_ApplicationModel_getName | /**
* @deprecated Replace to {@link ApplicationModel#getApplicationName()}
*/
@Deprecated
public static String getName() {
return defaultModel().getCurrentConfig().getName();
} | 3.68 |
hadoop_FSDataOutputStreamBuilder_overwrite | /**
* Set to true to overwrite the existing file.
* Set it to false, an exception will be thrown when calling {@link #build()}
* if the file exists.
*
* @param overwrite overrite.
* @return Generics Type B.
*/
public B overwrite(boolean overwrite) {
if (overwrite) {
flags.add(CreateFlag.OVERWRITE);
} els... | 3.68 |
zxing_GenericGF_multiply | /**
* @return product of a and b in GF(size)
*/
int multiply(int a, int b) {
if (a == 0 || b == 0) {
return 0;
}
return expTable[(logTable[a] + logTable[b]) % (size - 1)];
} | 3.68 |
framework_VaadinService_ensurePushAvailable | /**
* Enables push if push support is available and push has not yet been
* enabled.
*
* If push support is not available, a warning explaining the situation will
* be logged at least the first time this method is invoked.
*
* @return <code>true</code> if push can be used; <code>false</code> if push
* i... | 3.68 |
flink_FlinkRelMetadataQuery_getRelModifiedMonotonicity | /**
* Returns the {@link RelModifiedMonotonicity} statistic.
*
* @param rel the relational expression
* @return the monotonicity for the corresponding RelNode
*/
public RelModifiedMonotonicity getRelModifiedMonotonicity(RelNode rel) {
for (; ; ) {
try {
return modifiedMonotonicityHandler.ge... | 3.68 |
hbase_MetricsTableRequests_updateCheckAndPut | /**
* Update the CheckAndPut time histogram.
* @param time time it took
*/
public void updateCheckAndPut(long time) {
if (isEnableTableLatenciesMetrics()) {
checkAndPutTimeHistogram.update(time);
}
} | 3.68 |
framework_VCustomLayout_initializeHTML | /**
* Initialize HTML-layout.
*
* @param template
* original HTML-template
* @param themeUri
* URI to the current theme
*/
public void initializeHTML(String template, String themeUri) {
// Connect body of the template to DOM
template = extractBodyAndScriptsFromTemplate(template);
... | 3.68 |
flink_TableColumn_asSummaryString | /** Returns a string that summarizes this column for printing to a console. */
public String asSummaryString() {
final StringBuilder sb = new StringBuilder();
sb.append(name);
sb.append(": ");
sb.append(type);
explainExtras()
.ifPresent(
e -> {
... | 3.68 |
pulsar_AbstractTopic_updatePublishDispatcher | /**
* update topic publish dispatcher for this topic.
*/
public void updatePublishDispatcher() {
synchronized (topicPublishRateLimiterLock) {
PublishRate publishRate = topicPolicies.getPublishRate().get();
if (publishRate.publishThrottlingRateInByte > 0 || publishRate.publishThrottlingRateInMsg > ... | 3.68 |
hudi_BaseKeyGenerator_getKey | /**
* Generate a Hoodie Key out of provided generic record.
*/
@Override
public final HoodieKey getKey(GenericRecord record) {
if (getRecordKeyFieldNames() == null || getPartitionPathFields() == null) {
throw new HoodieKeyException("Unable to find field names for record key or partition path in cfg");
}
ret... | 3.68 |
hbase_RegionCoprocessorHost_preFlushScannerOpen | /**
* Invoked before create StoreScanner for flush.
*/
public ScanInfo preFlushScannerOpen(HStore store, FlushLifeCycleTracker tracker)
throws IOException {
if (coprocEnvironments.isEmpty()) {
return store.getScanInfo();
}
CustomizedScanInfoBuilder builder = new CustomizedScanInfoBuilder(store.getScanInfo... | 3.68 |
hadoop_ConfigurationUtils_load | /**
* Create a configuration from an InputStream.
* <p>
* ERROR canibalized from <code>Configuration.loadResource()</code>.
*
* @param is inputstream to read the configuration from.
*
* @throws IOException thrown if the configuration could not be read.
*/
public static void load(Configuration conf, InputStream ... | 3.68 |
hmily_IndexedBinder_bindIndexed | /**
* Bind indexed elements to the supplied collection.
*
* @param root The name of the property to bind
* @param target the target bindable
* @param elementBinder the binder to use for elements
* @param aggregateType the aggregate type, may be a collection or an array
* @param elementType the ... | 3.68 |
flink_PythonEnvUtils_preparePythonEnvironment | /**
* Prepares PythonEnvironment to start python process.
*
* @param config The Python configurations.
* @param entryPointScript The entry point script, optional.
* @param tmpDir The temporary directory which files will be copied to.
* @return PythonEnvironment the Python environment which will be executed in Pyt... | 3.68 |
morf_MySqlDialect_getSqlForNow | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForNow(org.alfasoftware.morf.sql.element.Function)
*/
@Override
protected String getSqlForNow(Function function) {
return "UTC_TIMESTAMP()";
} | 3.68 |
hbase_ForeignException_serialize | /**
* Converts a ForeignException 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 ForeignException
*/
public static byte[] serialize(String source, Throwable t) {
GenericExceptionMessag... | 3.68 |
pulsar_FunctionCacheManager_unregisterFunction | /**
* Unregisters a job from the function cache manager.
*
* @param fid function id
*/
default void unregisterFunction(String fid) {
unregisterFunctionInstance(fid, null);
} | 3.68 |
framework_FlyweightRow_removeCells | /**
* Removes cell representations (i.e. removed columns) from the indicated
* cell range and updates the subsequent indexing.
*
* @param index
* start index of the range
* @param numberOfColumns
* length of the range
*/
public void removeCells(final int index, final int numberOfColumns) {... | 3.68 |
flink_TimeWindowUtil_toEpochMillsForTimer | /**
* Get a timer time according to the timestamp mills and the given shift timezone.
*
* @param utcTimestampMills the timestamp mills.
* @param shiftTimeZone the timezone that the given timestamp mills has been shifted.
* @return the epoch mills.
*/
public static long toEpochMillsForTimer(long utcTimestampMills,... | 3.68 |
framework_LayoutManager_getOuterWidthDouble | /**
* Gets the outer width (including margins, paddings and borders) of the
* given element, provided that it has been measured. These elements are
* guaranteed to be measured:
* <ul>
* <li>ManagedLayouts and their child Connectors
* <li>Elements for which there is at least one ElementResizeListener
* <li>Elemen... | 3.68 |
framework_UidlWriter_write | /**
* Writes a JSON object containing all pending changes to the given UI.
*
* @param ui
* The {@link UI} whose changes to write
* @param writer
* The writer to use
* @param async
* True if this message is sent by the server asynchronously,
* false if it is a respons... | 3.68 |
hadoop_ServiceLauncher_extractCommandOptions | /**
* Extract the command options and apply them to the configuration,
* building an array of processed arguments to hand down to the service.
*
* @param conf configuration to update.
* @param args main arguments. {@code args[0]}is assumed to be
* the service classname and is skipped.
* @return the remaining arg... | 3.68 |
hadoop_DatanodeAdminProperties_setHostName | /**
* Set the host name of the datanode.
* @param hostName the host name of the datanode.
*/
public void setHostName(final String hostName) {
this.hostName = hostName;
} | 3.68 |
hbase_HBaseTestingUtility_killMiniHBaseCluster | /**
* Abruptly Shutdown HBase mini cluster. Does not shutdown zk or dfs if running.
* @throws java.io.IOException throws in case command is unsuccessful
*/
public void killMiniHBaseCluster() throws IOException {
cleanup();
if (this.hbaseCluster != null) {
getMiniHBaseCluster().killAll();
this.hbaseCluste... | 3.68 |
framework_UIDL_getFloatAttribute | /**
* Gets the named attribute as a float.
*
* @param name
* the name of the attribute to get
* @return the attribute value
*/
public float getFloatAttribute(String name) {
return (float) attr().getRawNumber(name);
} | 3.68 |
shardingsphere-elasticjob_ExecutionService_registerJobCompleted | /**
* Register job completed.
*
* @param shardingContexts sharding contexts
*/
public void registerJobCompleted(final ShardingContexts shardingContexts) {
JobRegistry.getInstance().setJobRunning(jobName, false);
if (!configService.load(true).isMonitorExecution()) {
return;
}
for (int each :... | 3.68 |
dubbo_ConcurrentHashSet_clear | /**
* Removes all of the elements from this set. The set will be empty after
* this call returns.
*/
@Override
public void clear() {
map.clear();
} | 3.68 |
framework_EventCellReference_isBody | /**
* Is the cell reference for a cell in the body of the Grid.
*
* @since 7.5
* @return <code>true</code> if referenced cell is in the body,
* <code>false</code> if not
*/
public boolean isBody() {
return section == Section.BODY;
} | 3.68 |
flink_VertexThreadInfoTrackerBuilder_setMaxThreadInfoDepth | /**
* Sets {@code delayBetweenSamples}.
*
* @param maxThreadInfoDepth Limit for the depth of the stack traces included when sampling
* threads.
* @return Builder.
*/
public VertexThreadInfoTrackerBuilder setMaxThreadInfoDepth(int maxThreadInfoDepth) {
this.maxThreadInfoDepth = maxThreadInfoDepth;
retu... | 3.68 |
flink_SecurityOptions_forProvider | /**
* Returns a view over the given configuration via which options can be set/retrieved for the
* given provider.
*
* <pre>
* Configuration config = ...
* SecurityOptions.forProvider(config, "my_provider")
* .set(SecurityOptions.DELEGATION_TOKEN_PROVIDER_ENABLED, false)
* ...
* </pre>
... | 3.68 |
flink_TableChange_getColumnName | /** Returns the column name. */
public String getColumnName() {
return columnName;
} | 3.68 |
hadoop_Sets_intersection | /**
* Returns the intersection of two sets as an unmodifiable set.
* The returned set contains all elements that are contained by both backing
* sets.
*
* <p>Results are undefined if {@code set1} and {@code set2} are sets based
* on different equivalence relations (as {@code HashSet}, {@code TreeSet},
* and the ... | 3.68 |
framework_VScrollTable_isInViewPort | /**
* Detects whether row is visible in tables viewport.
*
* @return
*/
public boolean isInViewPort() {
int absoluteTop = getAbsoluteTop();
int absoluteBottom = absoluteTop + getOffsetHeight();
int viewPortTop = scrollBodyPanel.getAbsoluteTop();
int viewPortBottom = viewPortTop
+ scrollB... | 3.68 |
flink_TypeInferenceExtractor_forScalarFunction | /** Extracts a type inference from a {@link ScalarFunction}. */
public static TypeInference forScalarFunction(
DataTypeFactory typeFactory, Class<? extends ScalarFunction> function) {
final FunctionMappingExtractor mappingExtractor =
new FunctionMappingExtractor(
typeFactory,... | 3.68 |
flink_PekkoRpcActor_handleCallAsync | /**
* Handle asynchronous {@link Callable}. This method simply executes the given {@link Callable}
* in the context of the actor thread.
*
* @param callAsync Call async message
*/
private void handleCallAsync(CallAsync callAsync) {
try {
Object result =
runWithContextClassLoader(
... | 3.68 |
shardingsphere-elasticjob_FailoverService_removeFailoverInfo | /**
* Remove failover info.
*/
public void removeFailoverInfo() {
for (String each : jobNodeStorage.getJobNodeChildrenKeys(ShardingNode.ROOT)) {
jobNodeStorage.removeJobNodeIfExisted(FailoverNode.getExecutionFailoverNode(Integer.parseInt(each)));
}
} | 3.68 |
flink_StreamExecutionEnvironment_addOperator | /**
* Adds an operator to the list of operators that should be executed when calling {@link
* #execute}.
*
* <p>When calling {@link #execute()} only the operators that where previously added to the list
* are executed.
*
* <p>This is not meant to be used by users. The API methods that create operators must call
... | 3.68 |
flink_DataSet_cross | /**
* Initiates a Cross transformation.
*
* <p>A Cross transformation combines the elements of two {@link DataSet DataSets} into one
* DataSet. It builds all pair combinations of elements of both DataSets, i.e., it builds a
* Cartesian product.
*
* <p>The resulting {@link org.apache.flink.api.java.operators.Cros... | 3.68 |
hibernate-validator_PredefinedScopeBeanMetaDataManager_getBeanConfigurationForHierarchy | /**
* Returns a list with the configurations for all types contained in the given type's hierarchy (including
* implemented interfaces) starting at the specified type.
*
* @param beanClass The type of interest.
* @param <T> The type of the class to get the configurations for.
* @return A set with the configuratio... | 3.68 |
framework_TableQuery_executeUpdateReturnKeys | /**
* Executes the given update query string using either the active connection
* if a transaction is already open, or a new connection from this query's
* connection pool.
*
* Additionally adds a new RowIdChangeEvent to the event buffer.
*
* @param sh
* an instance of StatementHelper, containing the... | 3.68 |
framework_VTooltip_getQuickOpenTimeout | /**
* Returns the time (in ms) during which {@link #getQuickOpenDelay()} should
* be used instead of {@link #getOpenDelay()}. The quick open delay is used
* when the tooltip has very recently been shown, is currently hidden but
* about to be shown again.
*
* @return The quick open timeout (in ms)
*/
public int g... | 3.68 |
hudi_StreamerUtil_metaClientForReader | /**
* Creates the meta client for reader.
*
* <p>The streaming pipeline process is long-running, so empty table path is allowed,
* the reader would then check and refresh the meta client.
*
* @see org.apache.hudi.source.StreamReadMonitoringFunction
*/
public static HoodieTableMetaClient metaClientForReader(
... | 3.68 |
flink_HiveParserUnparseTranslator_addTranslation | /**
* Register a translation to be performed as part of unparse. ANTLR imposes strict conditions on
* the translations and errors out during TokenRewriteStream.toString() if there is an overlap.
* It expects all the translations to be disjoint (See HIVE-2439). If the translation overlaps
* with any previously regis... | 3.68 |
flink_ConfigurationParserUtils_getSlot | /**
* Parses the configuration to get the number of slots and validates the value.
*
* @param configuration configuration object
* @return the number of slots in task manager
*/
public static int getSlot(Configuration configuration) {
int slots = configuration.getInteger(TaskManagerOptions.NUM_TASK_SLOTS, 1);
... | 3.68 |
hbase_ReadOnlyConfiguration_setAllowNullValueProperties | // Do not add @Override because it is not in Hadoop 2.6.5
public void setAllowNullValueProperties(boolean val) {
throw new UnsupportedOperationException("Read-only Configuration");
} | 3.68 |
flink_DagConnection_getShipStrategy | /**
* Gets the shipping strategy for this connection.
*
* @return The connection's shipping strategy.
*/
public ShipStrategyType getShipStrategy() {
return this.shipStrategy;
} | 3.68 |
streampipes_DataStreamBuilder_format | /**
* Assigns a new {@link org.apache.streampipes.model.grounding.TransportFormat} to the stream definition.
*
* @param format The transport format of the stream at runtime (e.g., JSON or Thrift).
* Use {@link org.apache.streampipes.sdk.helpers.Formats} to use some pre-defined formats
* ... | 3.68 |
dubbo_ReflectUtils_desc2class | /**
* desc to class.
* "[Z" => boolean[].class
* "[[Ljava/util/Map;" => java.util.Map[][].class
*
* @param cl ClassLoader instance.
* @param desc desc.
* @return Class instance.
* @throws ClassNotFoundException
*/
private static Class<?> desc2class(ClassLoader cl, String desc) throws ClassNotFoundException {... | 3.68 |
dubbo_StringToDurationConverter_detectAndParse | /**
* Detect the style then parse the value to return a duration.
*
* @param value the value to parse
* @param unit the duration unit to use if the value doesn't specify one ({@code null}
* will default to ms)
* @return the parsed duration
* @throws IllegalArgumentException if the value is not a kn... | 3.68 |
hadoop_VolumeFailureInfo_getEstimatedCapacityLost | /**
* Returns estimate of capacity lost. This is said to be an estimate, because
* in some cases it's impossible to know the capacity of the volume, such as if
* we never had a chance to query its capacity before the failure occurred.
*
* @return estimate of capacity lost in bytes
*/
public long getEstimatedCapa... | 3.68 |
querydsl_CollectionUtils_isUnmodifiableType | /**
* Returns true if the type is a known unmodifiable type.
*
* @param clazz the type
* @return true if the type is a known unmodifiable type
*/
public static boolean isUnmodifiableType(Class<?> clazz) {
for (; clazz != null; clazz = clazz.getSuperclass()) {
if (UNMODIFIABLE_TYPES.contains(clazz)) {
... | 3.68 |
querydsl_SQLExpressions_right | /**
* Get the rhs leftmost characters of lhs
*
* @param lhs string
* @param rhs character amount
* @return rhs rightmost characters
*/
public static StringExpression right(Expression<String> lhs, Expression<Integer> rhs) {
return Expressions.stringOperation(Ops.StringOps.RIGHT, lhs, rhs);
} | 3.68 |
zilla_HpackHuffman_transition | // Build one Node x byte transition
private static void transition(Node node, int b)
{
Node cur = node;
String str = node.symbols[b];
for (int i = 7; i >= 0; i--)
{
int bit = (b >>> i) & 0x01; // Using MSB to traverse
cur = bit == 0 ? cur.left : cur.right;
if (cur == n... | 3.68 |
flink_HiveTableUtil_createResolvedSchema | /** Create a Flink's ResolvedSchema from Hive table's columns and partition keys. */
public static ResolvedSchema createResolvedSchema(
List<FieldSchema> nonPartCols,
List<FieldSchema> partitionKeys,
Set<String> notNullColumns,
@Nullable UniqueConstraint primaryKey) {
Tuple2<String[... | 3.68 |
hudi_HoodieTableMetaClient_validateTableProperties | /**
* Validate table properties.
*
* @param properties Properties from writeConfig.
*/
public void validateTableProperties(Properties properties) {
// Once meta fields are disabled, it cant be re-enabled for a given table.
if (!getTableConfig().populateMetaFields()
&& Boolean.parseBoolean((String) propert... | 3.68 |
morf_ConnectionResourcesBean_getSchemaName | /**
* @see org.alfasoftware.morf.jdbc.ConnectionResources#getSchemaName()
*/
@Override
public String getSchemaName() {
return schemaName;
} | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.