name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_ProcedureExecutor_isFinished | /**
* Return true if the procedure is finished. The state may be "completed successfully" or "failed
* and rolledback". Use getResult() to check the state or get the result data.
* @param procId the ID of the procedure to check
* @return true if the procedure execution is finished, otherwise false.
*/
public boole... | 3.68 |
framework_AriaHelper_handleInputInvalid | /**
* Handles the required actions depending of the input element contains
* unaccepted input.
*
* @param element
* Element, typically an input Widget like TextField
* @param invalid
* boolean, true when the element input has an error
*/
public static void handleInputInvalid(Element elemen... | 3.68 |
framework_Button_writeDesign | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.AbstractComponent#writeDesign(org.jsoup.nodes.Element
* , com.vaadin.ui.declarative.DesignContext)
*/
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
Attributes attr = design.attributes();
... | 3.68 |
flink_StringUtils_byteToHexString | /**
* Given an array of bytes it will convert the bytes to a hex string representation of the
* bytes.
*
* @param bytes the bytes to convert in a hex string
* @return hex string representation of the byte array
*/
public static String byteToHexString(final byte[] bytes) {
return byteToHexString(bytes, 0, byte... | 3.68 |
flink_FunctionContext_getMetricGroup | /**
* Returns the metric group for this parallel subtask.
*
* @return metric group for this parallel subtask.
*/
public MetricGroup getMetricGroup() {
if (context == null) {
LOG.warn(
"Calls to FunctionContext.getMetricGroup will have no effect "
+ "at the current... | 3.68 |
flink_SourcePredicates_areJavaClasses | /**
* Tests that a given class is a Java class.
*
* <p>ArchUnit does not yet fully support Scala. Rules should ensure that they restrict
* themselves to only Java classes for correct results.
*/
public static DescribedPredicate<JavaClass> areJavaClasses() {
return new DescribedPredicate<JavaClass>("are Java cl... | 3.68 |
druid_Resources_getDefaultClassLoader | /**
* Returns the default classloader (may be null).
*
* @return The default classloader
*/
public static ClassLoader getDefaultClassLoader() {
return defaultClassLoader;
} | 3.68 |
hbase_WALPrettyPrinter_setSequenceFilter | /**
* sets the region by which output will be filtered when nonnegative, serves as a filter; only log
* entries with this sequence id will be printed
*/
public void setSequenceFilter(long sequence) {
this.sequence = sequence;
} | 3.68 |
flink_DataSet_maxBy | /**
* Selects an element with maximum value.
*
* <p>The maximum is computed over the specified fields in lexicographical order.
*
* <p><strong>Example 1</strong>: Given a data set with elements <code>[0, 1], [1, 0]</code>,
* the results will be:
*
* <ul>
* <li><code>maxBy(0)</code>: <code>[1, 0]</code>
* ... | 3.68 |
framework_VUI_storeFocus | /**
* Allows to store the currently focused Element.
*
* Current use case is to store the focus when a Window is opened. Does
* currently handle only a single value. Needs to be extended for #12158
*
* @param focusedElement
*/
public void storeFocus() {
storedFocus = WidgetUtil.getFocusedElement();
} | 3.68 |
framework_DateCell_updatePositionFor | // date methods are not deprecated in GWT
@SuppressWarnings("deprecation")
private void updatePositionFor(DateCellDayEvent dayEvent, Date targetDay,
CalendarEvent calendarEvent) {
if (shouldDisplay(calendarEvent)) {
dayEvent.getElement().getStyle().clearDisplay();
Date fromDt = calendarEve... | 3.68 |
hudi_StreamerUtil_initTableIfNotExists | /**
* Initialize the table if it does not exist.
*
* @param conf the configuration
* @throws IOException if errors happens when writing metadata
*/
public static HoodieTableMetaClient initTableIfNotExists(
Configuration conf,
org.apache.hadoop.conf.Configuration hadoopConf) throws IOException {
final Str... | 3.68 |
querydsl_QueryBase_groupBy | /**
* Add grouping/aggregation expressions
*
* @param o group by expressions
* @return the current object
*/
public Q groupBy(Expression<?>... o) {
return queryMixin.groupBy(o);
} | 3.68 |
flink_ContextResolvedTable_isTemporary | /** @return true if the table is temporary. An anonymous table is always temporary. */
public boolean isTemporary() {
return catalog == null;
} | 3.68 |
MagicPlugin_MagicController_registerPreLoad | // Kind of a misnomer now, the whole notion of having plugins register in a "preload" event is flawed,
// since it requires those plugins to load before magic in order to register an event handler.
// Anyway, this is now done after loading is really finished.
protected void registerPreLoad(ConfigurationSection configur... | 3.68 |
hbase_RSGroupInfoManagerImpl_getRegions | /** Returns List of Regions associated with this <code>server</code>. */
private List<RegionInfo> getRegions(final Address server) {
LinkedList<RegionInfo> regions = new LinkedList<>();
for (Map.Entry<RegionInfo, ServerName> el : masterServices.getAssignmentManager()
.getRegionStates().getRegionAssignments().en... | 3.68 |
flink_DataSet_min | /**
* Syntactic sugar for {@link #aggregate(Aggregations, int)} using {@link Aggregations#MIN} as
* the aggregation function.
*
* <p><strong>Note:</strong> This operation is not to be confused with {@link #minBy(int...)},
* which selects one element with the minimum value at the specified field positions.
*
* @p... | 3.68 |
framework_MeasuredSize_measure | /**
* Measures paddings, margins, border, height, and weight of the given
* element and stores the results within this {@link MeasuredSize} object.
*
* @param element
* element to be measured
* @param thoroughSizeCheck
* {@code true} if the measuring should use the more reliable
* ... | 3.68 |
flink_PrioritizedDeque_peek | /**
* Returns the first priority element or non-priority element if the former does not exist.
*
* @return the first element or null.
*/
@Nullable
public T peek() {
return deque.peek();
} | 3.68 |
streampipes_InfluxStore_createDatabase | /**
* Creates a new database with the given name
*
* @param dbName The name of the database which should be created
*/
private void createDatabase(String dbName) throws SpRuntimeException {
if (!dbName.matches("^[a-zA-Z_]\\w*$")) {
throw new SpRuntimeException(
"Database name '" + dbName + "' not allo... | 3.68 |
hbase_RegionPlan_compareTo | /**
* Compare the region info.
* @param other region plan you are comparing against
*/
@Override
public int compareTo(RegionPlan other) {
return compareTo(this, other);
} | 3.68 |
starts_Writer_writeGraph | /**
* Write the graph to file, together with any new edges (if any) that we get
* from parsing classes that changed.
*
* @param graph The graph that we want to write
* @param artifactsDir The directory in which we are writing STARTS artifacts
* @param print Write graph to file if true
* @param g... | 3.68 |
AreaShop_RegionSign_runSignCommands | /**
* Run commands when a player clicks a sign.
* @param clicker The player that clicked the sign
* @param clickType The type of clicking
* @return true if the commands ran successfully, false if any of them failed
*/
public boolean runSignCommands(Player clicker, GeneralRegion.ClickType clickType) {
Configurat... | 3.68 |
pulsar_DLOutputStream_closeAsync | /**
* Every package will be a stream. So we need mark the stream as EndOfStream when the stream
* write done.
*
* @return
*/
CompletableFuture<Void> closeAsync() {
return writer.markEndOfStream()
.thenCompose(ignore -> writer.asyncClose())
.thenCompose(ignore -> distributedLogManager.asyncClose... | 3.68 |
hbase_MultipleColumnPrefixFilter_parseFrom | /**
* Parse a serialized representation of {@link MultipleColumnPrefixFilter}
* @param pbBytes A pb serialized {@link MultipleColumnPrefixFilter} instance
* @return An instance of {@link MultipleColumnPrefixFilter} made from <code>bytes</code>
* @throws DeserializationException if an error occurred
* @see #toByteA... | 3.68 |
AreaShop_ImportJob_minutesToString | /**
* Convert minutes to a human-readable string.
* @param minutes Value to convert
* @return String that represents the same length of time in a readable format, like "1 day", "5 minutes", "3 months"
*/
private String minutesToString(long minutes) {
// If the specified number of minutes can map nicely to a higher... | 3.68 |
hadoop_AuxServiceConfiguration_toIndentedString | /**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | 3.68 |
hbase_ParseFilter_parseComparator | /**
* Splits a column in comparatorType:comparatorValue form into separate byte arrays
* <p>
* @param comparator the comparator
* @return the parsed arguments of the comparator as a 2D byte array
*/
public static byte[][] parseComparator(byte[] comparator) {
final int index =
Bytes.searchDelimiterIndex(compa... | 3.68 |
flink_LogicalTypeJsonDeserializer_deserializeInternal | /**
* Deserialize json according to the original type root. It's reverse operation of {@code
* SerializerWIP#serializeinternal}.
*/
private LogicalType deserializeInternal(JsonNode logicalTypeNode) {
LogicalTypeRoot typeRoot =
LogicalTypeRoot.valueOf(logicalTypeNode.get(FIELD_NAME_TYPE_NAME).asText()... | 3.68 |
shardingsphere-elasticjob_ConfigurationService_setUpJobConfiguration | /**
* Set up job configuration.
*
* @param jobClassName job class name
* @param jobConfig job configuration to be updated
* @return accepted job configuration
*/
public JobConfiguration setUpJobConfiguration(final String jobClassName, final JobConfiguration jobConfig) {
checkConflictJob(jobClassName, jobConf... | 3.68 |
hadoop_BaseService_destroy | /**
* Destroy the services. This method is called once, when the
* {@link Server} owning the service is being destroyed.
* <p>
* This method does a NOP.
*/
@Override
public void destroy() {
} | 3.68 |
framework_TabSheetScrollOnTabClose_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 14348;
} | 3.68 |
flink_DataStream_shuffle | /**
* Sets the partitioning of the {@link DataStream} so that the output elements are shuffled
* uniformly randomly to the next operation.
*
* @return The DataStream with shuffle partitioning set.
*/
@PublicEvolving
public DataStream<T> shuffle() {
return setConnectionType(new ShufflePartitioner<T>());
} | 3.68 |
framework_TooltipInfo_setErrorLevel | /**
* Sets the error level.
*
* @param errorLevel
* the error level to set
* @since 8.2
*/
public void setErrorLevel(ErrorLevel errorLevel) {
this.errorLevel = errorLevel;
} | 3.68 |
dubbo_Stack_remove | /**
* remove.
*
* @param index
* @return element
*/
public E remove(int index) {
if (index >= mSize || index + mSize < 0) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
}
E ret = mElements.remove(index < 0 ? index + mSize : index);
mSize--;
return ret;
} | 3.68 |
hbase_Threads_sleep | /**
* If interrupted, just prints out the interrupt on STDOUT, resets interrupt and returns
* @param millis How long to sleep for in milliseconds.
*/
public static void sleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
LOG.warn("sleep interrupted", e);
Thread.current... | 3.68 |
framework_EditorHandler_failure | /**
* Informs Grid that an error occurred while trying to process the
* request. This method is a short-hand for calling {@link #failure()}
* and {@link Editor#setEditorError(String, Collection)}
*
* @param errorMessage
* and error message to show to the user, or
* <code>null</code> to not ... | 3.68 |
hadoop_LoadedManifestData_getEntrySequenceData | /**
* Get the path to the entry sequence data file.
* @return the path
*/
public Path getEntrySequenceData() {
return entrySequenceData;
} | 3.68 |
flink_DateTimeUtils_ymdhms | /** Appends year-month-day and hour:minute:second to a buffer; assumes they are valid. */
private static StringBuilder ymdhms(
StringBuilder b, int year, int month, int day, int h, int m, int s) {
ymd(b, year, month, day);
b.append(' ');
hms(b, h, m, s);
return b;
} | 3.68 |
MagicPlugin_Targeting_getPreviousBlock | /**
* Returns the previous block along the line of vision
*
* @return The block
*/
public Block getPreviousBlock()
{
return previousBlock;
} | 3.68 |
querydsl_NumberExpression_ltAll | /**
* Create a {@code this < all right} expression
*
* @param right rhs
* @return this < all right
*/
public BooleanExpression ltAll(CollectionExpression<?, ? super T> right) {
return lt(ExpressionUtils.<T> all(right));
} | 3.68 |
hbase_User_getName | /**
* Returns the full user name. For Kerberos principals this will include the host and realm
* portions of the principal name.
* @return User full name.
*/
public String getName() {
return ugi.getUserName();
} | 3.68 |
querydsl_GuavaGroupByBuilder_asTable | /**
* Get the results as sorted table
*
* @param column column expression
* @param expression value expression
* @param <C> Column type
* @param <V> Value type
* @return new result transformer
*/
public <C, V> ResultTransformer<Table<K, C, V>> asTable(final Expression<C> column, final Expression<V> expression) ... | 3.68 |
hbase_RegionPlacementMaintainer_printAssignmentPlan | /**
* Print the assignment plan to the system output stream
*/
public static void printAssignmentPlan(FavoredNodesPlan plan) {
if (plan == null) return;
LOG.info("========== Start to print the assignment plan ================");
// sort the map based on region info
Map<String, List<ServerName>> assignmentMap ... | 3.68 |
AreaShop_RegionGroup_removeWorld | /**
* Remove a member from the group.
* @param world World to remove
* @return true if the region was in the group before, otherwise false
*/
public boolean removeWorld(String world) {
if(worlds.remove(world)) {
setSetting("regionsFromWorlds", new ArrayList<>(worlds));
saveRequired();
autoDirty();
return t... | 3.68 |
hudi_FileSystemViewManager_createRemoteFileSystemView | /**
* Create a remote file System view for a table.
*
* @param conf Hadoop Configuration
* @param viewConf View Storage Configuration
* @param metaClient Hoodie Table MetaClient for the table.
* @return
*/
private static RemoteHoodieTableFileSystemView createRemoteFileSystemView(SerializableConfiguration conf,
... | 3.68 |
hudi_QuickstartUtils_generateDeletes | /**
* Generates delete records for the passed in rows.
*
* @param rows List of {@link Row}s for which delete record need to be generated
* @return list of hoodie records to delete
*/
public List<String> generateDeletes(List<Row> rows) {
// if row.length() == 2, then the record contains "uuid" and "partitionpath"... | 3.68 |
dubbo_ConfigValidationUtils_checkMock | /**
* Legitimacy check and setup of local simulated operations. The operations can be a string with Simple operation or
* a classname whose {@link Class} implements a particular function
*
* @param interfaceClass for provider side, it is the {@link Class} of the service that will be exported; for consumer
* ... | 3.68 |
flink_SqlFunctionUtils_cot | /** SQL <code>COT</code> operator applied to double values. */
public static double cot(double b0) {
return 1.0d / Math.tan(b0);
} | 3.68 |
AreaShop_FileManager_loadFiles | /**
* Load all files from disk.
* @param thisTick Load files in the current tick or a tick later
* @return true if the files are loaded correctly, otherwise false
*/
public boolean loadFiles(boolean thisTick) {
// Load config.yml + add defaults from .jar
boolean result = loadConfigFile();
// Load default.yml + a... | 3.68 |
framework_AbstractDateField_setDefaultValue | /**
* Sets the default value for the field. The default value is the starting
* point for the date field when nothing has been selected yet. If no
* default value is set, current date/time is used.
*
* @param defaultValue
* the default value, may be {@code null}
* @since 8.1.2
*/
public void setDefau... | 3.68 |
morf_OracleMetaDataProvider_dataTypeForColumn | /**
* Get our {@link DataType} from the Oracle type. This serves the same purpose
* as {@link DatabaseMetaDataProvider#dataTypeFromSqlType(int, String, int)} but is
* entirely Oracle specific.
*
* @param dataTypeName The Oracle type name.
* @param commentType the type of the column stored in a comment.
* @return... | 3.68 |
querydsl_Expressions_dslTemplate | /**
* Create a new Template expression
*
* @param cl type of expression
* @param template template
* @param args template parameters
* @return template expression
*/
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, List<?> args) {
return new DslTemplate<T>(cl, template, ... | 3.68 |
flink_SplitFetcherManager_close | /**
* Close the split fetcher manager.
*
* @param timeoutMs the max time in milliseconds to wait.
* @throws Exception when failed to close the split fetcher manager.
*/
public synchronized void close(long timeoutMs) throws Exception {
closed = true;
fetchers.values().forEach(SplitFetcher::shutdown);
ex... | 3.68 |
flink_ChainedStateHandle_get | /**
* Get the state handle for a single operator in the operator chain by it's index.
*
* @param index the index in the operator chain
* @return state handle to the operator at the given position in the operator chain. can be
* null.
*/
public T get(int index) {
return operatorStateHandles.get(index);
} | 3.68 |
hadoop_OBSFileSystem_getListParallelFactor | /**
* Return list parallel factor.
*
* @return the list parallel factor
*/
int getListParallelFactor() {
return listParallelFactor;
} | 3.68 |
morf_AbstractSqlDialectTest_testUseIndexOnSubquery | /**
* Check that we don't allow the use of the use index hint on a subquery.
*/
@Test(expected = IllegalArgumentException.class)
public void testUseIndexOnSubquery() {
testDialect.convertStatementToSQL(
select().from(select().from("Foo").useIndex(tableRef("Foo"), "Foo_1"))
);
} | 3.68 |
framework_DesignFormatter_getRegisteredClasses | /**
* Returns a set of classes that have a converter registered. This is <b>not
* the same</b> as the list of supported classes - subclasses of classes in
* this set are also supported.
*
* @return An unmodifiable set of classes that have a converter registered.
*/
protected Set<Class<?>> getRegisteredClasses() {... | 3.68 |
hadoop_BondedS3AStatisticsContext_newCommitterStatistics | /**
* Create a new instance of the committer statistics.
* @return a new committer statistics instance
*/
@Override
public CommitterStatistics newCommitterStatistics() {
return getInstrumentation().newCommitterStatistics();
} | 3.68 |
hbase_QuotaCache_getRegionServerQuotaLimiter | /**
* Returns the limiter associated to the specified region server.
* @param regionServer the region server to limit
* @return the limiter associated to the specified region server
*/
public QuotaLimiter getRegionServerQuotaLimiter(final String regionServer) {
return getQuotaState(this.regionServerQuotaCache, re... | 3.68 |
hbase_MetricsSource_incrSizeOfLogQueue | /**
* Increment size of the log queue.
*/
public void incrSizeOfLogQueue() {
singleSourceSource.incrSizeOfLogQueue(1);
globalSourceSource.incrSizeOfLogQueue(1);
} | 3.68 |
rocketmq-connect_LogReporter_report | /**
* Log error context.
*
* @param context the processing context.
*/
@Override
public void report(ProcessingContext context) {
errorMetricsGroup.recordErrorLogged();
log.error(message(context), context.error());
} | 3.68 |
hadoop_PlacementConstraints_build | /**
* Creates a {@link PlacementConstraint} given a constraint expression.
*
* @param constraintExpr the constraint expression
* @return the placement constraint
*/
public static PlacementConstraint build(AbstractConstraint constraintExpr) {
return constraintExpr.build();
} | 3.68 |
hadoop_Validate_checkIntegerMultiple | /**
* Validates that the first value is an integer multiple of the second value.
* @param value1 the first value to check.
* @param value1Name the name of the first argument.
* @param value2 the second value to check.
* @param value2Name the name of the second argument.
*/
public static void checkIntegerMultiple(... | 3.68 |
flink_LocatableInputSplit_getHostnames | /**
* Returns the names of the hosts storing the data this input split refers to
*
* @return the names of the hosts storing the data this input split refers to
*/
public String[] getHostnames() {
return this.hostnames;
} | 3.68 |
hbase_HFileWriterImpl_appendFileInfo | /**
* Add to the file info. All added key/value pairs can be obtained using
* {@link HFile.Reader#getHFileInfo()}.
* @param k Key
* @param v Value
* @throws IOException in case the key or the value are invalid
*/
@Override
public void appendFileInfo(final byte[] k, final byte[] v) throws IOException {
fileInfo.... | 3.68 |
dubbo_DeadlineFuture_newFuture | /**
* init a DeadlineFuture 1.init a DeadlineFuture 2.timeout check
*
* @param timeout timeout in Mills
* @return a new DeadlineFuture
*/
public static DeadlineFuture newFuture(
String serviceName, String methodName, String address, int timeout, ExecutorService executor) {
final DeadlineFuture future =... | 3.68 |
hadoop_WrappedIOStatistics_getWrapped | /**
* Get at the wrapped inner statistics.
* @return the wrapped value
*/
protected IOStatistics getWrapped() {
return wrapped;
} | 3.68 |
framework_AbsoluteLayoutResizeComponents_addStartWithDefinedWidthAbsoluteLayout | /**
* Build test layout for #8257
*/
private void addStartWithDefinedWidthAbsoluteLayout(AbsoluteLayout layout) {
AbsoluteLayout layoutExpading = new AbsoluteLayout();
layoutExpading.setWidth("250px");
layoutExpading.addComponent(
new Panel(new CssLayout(new Label("Start Width 250px"))));
... | 3.68 |
hmily_MetricsReporter_gaugeIncrement | /**
* Gauge increment.
*
* @param name name
*/
public static void gaugeIncrement(final String name) {
gaugeIncrement(name, null);
} | 3.68 |
framework_VTooltip_setCloseTimeout | /**
* Sets the time (in ms) the tooltip should be displayed after an event that
* will cause it to be closed (e.g. mouse click outside the component, key
* down).
*
* @param closeTimeout
* The close timeout (in ms)
*/
public void setCloseTimeout(int closeTimeout) {
this.closeTimeout = closeTimeout... | 3.68 |
flink_MemoryUtils_wrapUnsafeMemoryWithByteBuffer | /**
* Wraps the unsafe native memory with a {@link ByteBuffer}.
*
* @param address address of the unsafe memory to wrap
* @param size size of the unsafe memory to wrap
* @return a {@link ByteBuffer} which is a view of the given unsafe memory
*/
static ByteBuffer wrapUnsafeMemoryWithByteBuffer(long address, int si... | 3.68 |
hbase_Result_rawCells | /**
* Return the array of Cells backing this Result instance. The array is sorted from smallest ->
* largest using the {@link CellComparator}. The array only contains what your Get or Scan
* specifies and no more. For example if you request column "A" 1 version you will have at most 1
* Cell in the array. If you... | 3.68 |
flink_CompileUtils_compileExpression | /**
* Compiles an expression code to a janino {@link ExpressionEvaluator}.
*
* @param code the expression code
* @param argumentNames the expression argument names
* @param argumentClasses the expression argument classes
* @param returnClass the return type of the expression
* @return the compiled class
*/
publ... | 3.68 |
hbase_ParseFilter_getSupportedFilters | /**
* Return a Set of filters supported by the Filter Language
*/
public Set<String> getSupportedFilters() {
return filterHashMap.keySet();
} | 3.68 |
cron-utils_StringUtils_isEmpty | /**
* <p>Checks if a CharSequence is empty ("") or null.</p>
*
* <pre>
* StringUtils.isEmpty(null) = true
* StringUtils.isEmpty("") = true
* StringUtils.isEmpty(" ") = false
* StringUtils.isEmpty("bob") = false
* StringUtils.isEmpty(" bob ") = false
* </pre>
*
* <p>NOTE: This method c... | 3.68 |
flink_NFAStateNameHandler_getOriginalNameFromInternal | /**
* Implements the reverse process of the {@link #getUniqueInternalName(String)}.
*
* @param internalName The name to be decoded.
* @return The original, user-specified name for the state.
*/
public static String getOriginalNameFromInternal(String internalName) {
Preconditions.checkNotNull(internalName);
... | 3.68 |
hibernate-validator_ConstraintViolationImpl_getExpressionVariables | /**
* @return the expression variables added using {@link HibernateConstraintValidatorContext#addExpressionVariable(String, Object)}
*/
public Map<String, Object> getExpressionVariables() {
return expressionVariables;
} | 3.68 |
morf_H2Dialect_getSqlForRowNumber | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForRowNumber()
*/
@Override
protected String getSqlForRowNumber() {
return "ROW_NUMBER() OVER()";
} | 3.68 |
hbase_HFileLink_isHFileLink | /**
* @param fileName File name to check.
* @return True if the path is a HFileLink.
*/
public static boolean isHFileLink(String fileName) {
Matcher m = LINK_NAME_PATTERN.matcher(fileName);
if (!m.matches()) {
return false;
}
return m.groupCount() > 2 && m.group(4) != null && m.group(3) != null && m.grou... | 3.68 |
cron-utils_FieldParser_intToInt | /**
* Maps integer values to another integer equivalence. Always consider mapping higher integers to lower once. Ex.: if 0 and 7 mean the
* same, map 7 to 0.
*
* @param exp - integer to be mapped
* @return Mapping integer. If no mapping int is found, will return exp
*/
@VisibleForTesting
protected int intToInt(fi... | 3.68 |
hbase_BackupManifest_canCoverImage | /**
* Check whether backup image set could cover a backup image or not.
* @param fullImages The backup image set
* @param image The target backup image
* @return true if fullImages can cover image, otherwise false
*/
public static boolean canCoverImage(ArrayList<BackupImage> fullImages, BackupImage image) {
... | 3.68 |
dubbo_RpcContextAttachment_setAttachment | /**
* set attachment.
*
* @param key
* @param value
* @return context
*/
@Override
public RpcContextAttachment setAttachment(String key, String value) {
return setObjectAttachment(key, (Object) value);
} | 3.68 |
hbase_CatalogJanitor_scanForReport | /**
* Scan hbase:meta.
* @return Return generated {@link CatalogJanitorReport}
*/
// will be override in tests.
protected CatalogJanitorReport scanForReport() throws IOException {
ReportMakingVisitor visitor = new ReportMakingVisitor(this.services);
// Null tablename means scan all of meta.
MetaTableAccessor.s... | 3.68 |
flink_UserDefinedFunctionHelper_isClassNameSerializable | /**
* Returns whether a {@link UserDefinedFunction} can be easily serialized and identified by only
* a fully qualified class name. It must have a default constructor and no serializable fields.
*
* <p>Other properties (such as checks for abstract classes) are validated at the entry points
* of the API, see {@link... | 3.68 |
hadoop_OBSInputStream_readFully | /**
* Subclass {@code readFully()} operation which only seeks at the start of the
* series of operations; seeking back at the end.
*
* <p>This is significantly higher performance if multiple read attempts
* are needed to fetch the data, as it does not break the HTTP connection.
*
* <p>To maintain thread safety r... | 3.68 |
hadoop_MutableGaugeInt_set | /**
* Set the value of the metric
* @param value to set
*/
public void set(int value) {
this.value.set(value);
setChanged();
} | 3.68 |
hadoop_DiskBalancerWorkItem_getSecondsElapsed | /**
* Gets the number of seconds elapsed from the start time.
*
* The reason why we have this is of time skews. The client's current time
* may not match with the server time stamp, hence the elapsed second
* cannot be computed from only startTime.
*
* @return seconds elapsed from start time.
*/
public long get... | 3.68 |
hbase_Result_containsNonEmptyColumn | /**
* Checks if the specified column contains a non-empty value (not 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 w... | 3.68 |
flink_JavaFieldPredicates_isFinal | /**
* Match the final modifier of the {@link JavaField}.
*
* @return A {@link DescribedPredicate} returning true, if and only if the tested {@link
* JavaField} has the final modifier.
*/
public static DescribedPredicate<JavaField> isFinal() {
return DescribedPredicate.describe(
"final", field -... | 3.68 |
framework_Page_updateBrowserWindowSize | /**
* For internal use only. Updates the internal state with the given values.
* Does not resize the Page or browser window.
*
* @since 7.2
*
* @param width
* the new browser window width
* @param height
* the new browser window height
* @param fireEvents
* whether to fire {@... | 3.68 |
flink_TSetClientInfoReq_findByThriftId | /** Find the _Fields constant that matches fieldId, or null if its not found. */
public static _Fields findByThriftId(int fieldId) {
switch (fieldId) {
case 1: // SESSION_HANDLE
return SESSION_HANDLE;
case 2: // CONFIGURATION
return CONFIGURATION;
default:
... | 3.68 |
flink_DecimalDataUtils_sround | /** SQL <code>ROUND</code> operator applied to BigDecimal values. */
public static DecimalData sround(DecimalData b0, int r) {
if (r >= b0.scale) {
return b0;
}
BigDecimal b2 =
b0.toBigDecimal()
.movePointRight(r)
.setScale(0, RoundingMode.HALF_UP... | 3.68 |
hudi_DataSourceUtils_createUserDefinedBulkInsertPartitionerWithRows | /**
* Create a UserDefinedBulkInsertPartitionerRows class via reflection,
* <br>
* if the class name of UserDefinedBulkInsertPartitioner is configured through the HoodieWriteConfig.
*
* @see HoodieWriteConfig#getUserDefinedBulkInsertPartitionerClass()
*/
public static Option<BulkInsertPartitioner<Dataset<Row>>> c... | 3.68 |
hmily_AssertUtils_notNull | /**
* Not null.
*
* @param obj the obj
*/
public static void notNull(final Object obj) {
if (obj == null) {
throw new HmilyRuntimeException("argument invalid,Please check");
}
} | 3.68 |
flink_MessageSerializer_writeHeader | /**
* Helper for serializing the header.
*
* @param buf The {@link ByteBuf} to serialize the header into.
* @param messageType The {@link MessageType} of the message this header refers to.
*/
private static void writeHeader(final ByteBuf buf, final MessageType messageType) {
buf.writeInt(VERSION);
buf.writ... | 3.68 |
hbase_ProcedureWALFile_addToSize | /**
* Used to update in-progress log sizes. the FileStatus will report 0 otherwise.
*/
void addToSize(long size) {
this.logSize += size;
} | 3.68 |
hbase_UserQuotaState_setQuotas | /**
* Add the quota information of the specified namespace. (This operation is part of the QuotaState
* setup)
*/
public void setQuotas(final String namespace, Quotas quotas) {
namespaceLimiters = setLimiter(namespaceLimiters, namespace, quotas);
} | 3.68 |
framework_VaadinService_createAndRegisterSession | /**
* Creates and registers a new VaadinSession for this service. Assumes
* proper locking has been taken care of by the caller.
*
*
* @param request
* The request which triggered session creation.
* @return A new VaadinSession instance
* @throws ServiceException
*/
private VaadinSession createAndRe... | 3.68 |
hbase_HMaster_isRegionOnline | /**
* @return True if region is online and scannable else false if an error or shutdown (Otherwise we
* just block in here holding up all forward-progess).
*/
private boolean isRegionOnline(RegionInfo ri) {
RetryCounter rc = null;
while (!isStopped()) {
RegionState rs = this.assignmentManager.getRegi... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.