name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_OrderedBytes_putUint32 | /**
* Write a 32-bit unsigned integer to {@code dst} as 4 big-endian bytes.
* @return number of bytes written.
*/
private static int putUint32(PositionedByteRange dst, int val) {
dst.put((byte) (val >>> 24)).put((byte) (val >>> 16)).put((byte) (val >>> 8)).put((byte) val);
return 4;
} | 3.68 |
flink_FileCatalogStore_getCatalog | /**
* Returns the catalog descriptor for the specified catalog, if it exists in the catalog store.
*
* @param catalogName the name of the catalog to retrieve
* @return an {@link Optional} containing the catalog descriptor, or an empty {@link Optional}
* if the catalog does not exist in the catalog store
* @th... | 3.68 |
morf_DataValueLookupBuilderImpl_grow | /**
* Grow the array to accommodate new values. Based on {@link ArrayList}, but
* without the overflow protection. We've got bigger problems if records get
* that big.
*/
private void grow() {
int size = metadata.getColumnNames().size();
data = Arrays.copyOf(data, size + (size >> 1));
} | 3.68 |
framework_ConnectorTracker_removeUnregisteredConnectors | /**
* Removes all references and information about connectors marked as
* unregistered.
*
*/
private void removeUnregisteredConnectors() {
GlobalResourceHandler globalResourceHandler = uI.getSession()
.getGlobalResourceHandler(false);
for (ClientConnector connector : unregisteredConnectors) {
... | 3.68 |
flink_PythonEnvUtils_resetCallbackClient | /**
* Reset the callback client of gatewayServer with the given callbackListeningAddress and
* callbackListeningPort after the callback server started.
*
* @param callbackServerListeningAddress the listening address of the callback server.
* @param callbackServerListeningPort the listening port of the callback ser... | 3.68 |
framework_ElementResizeEvent_getLayoutManager | /**
* Returns the current layout manager.
*
* @return the layout manager
*/
public LayoutManager getLayoutManager() {
return layoutManager;
} | 3.68 |
AreaShop_GeneralRegion_getDepth | /**
* Get the depth of the region (z-axis).
* @return The depth of the region (z-axis)
*/
@Override
public int getDepth() {
if(getRegion() == null) {
return 0;
}
return getMaximumPoint().getBlockZ() - getMinimumPoint().getBlockZ() + 1;
} | 3.68 |
druid_DruidDataSourceStatLoggerImpl_configFromProperties | /**
* @since 0.2.21
*/
@Override
public void configFromProperties(Properties properties) {
if (properties == null) {
return;
}
String property = properties.getProperty("druid.stat.loggerName");
if (property != null && property.length() > 0) {
setLoggerName(property);
}
} | 3.68 |
framework_SelectorPath_getNameFromPredicates | /**
* Get variable name based on predicates. Fallback to elementType
*
* @param predicates
* Predicates related to element
* @param elementType
* Element type
* @return name for Variable
*/
private String getNameFromPredicates(List<SelectorPredicate> predicates,
String elementType)... | 3.68 |
framework_Calendar_expandEndDate | /**
* Finds the last day of the week and returns a day representing the end of
* that day.
*
* @param end
* The actual date
* @param expandToFullWeek
* Should the returned date be moved to the end of the week
* @return If expandToFullWeek is set then it returns the last day of the
* ... | 3.68 |
streampipes_AbstractProcessingElementBuilder_unaryMappingPropertyWithoutRequirement | /**
* Adds a new {@link org.apache.streampipes.model.staticproperty.MappingPropertyUnary}
* to the pipeline element definition which is not linked to a specific input property.
*
* @param label A human-readable label that is displayed to users in the StreamPipes UI.
* @param propertyScope Only input event ... | 3.68 |
hbase_HRegion_setTimeoutForWriteLock | /**
* The {@link HRegion#doClose} will block forever if someone tries proving the dead lock via the
* unit test. Instead of blocking, the {@link HRegion#doClose} will throw exception if you set the
* timeout.
* @param timeoutForWriteLock the second time to wait for the write lock in
* {@... | 3.68 |
hbase_MetricRegistriesLoader_load | /**
* Creates a {@link MetricRegistries} instance using the corresponding {@link MetricRegistries}
* available to {@link ServiceLoader} on the classpath. If no instance is found, then default
* implementation will be loaded.
* @return A {@link MetricRegistries} implementation.
*/
static MetricRegistries load(List<... | 3.68 |
hbase_MetricsConnection_getMetricScope | /** scope of the metrics object */
public String getMetricScope() {
return scope;
} | 3.68 |
hadoop_ParsedTaskAttempt_putDiagnosticInfo | /** Set the task attempt diagnostic-info */
public void putDiagnosticInfo(String msg) {
diagnosticInfo = msg;
} | 3.68 |
framework_AbstractClientConnector_getErrorHandler | /*
* (non-Javadoc)
*
* @see com.vaadin.server.ClientConnector#getErrorHandler()
*/
@Override
public ErrorHandler getErrorHandler() {
return errorHandler;
} | 3.68 |
framework_CheckBoxGroupElement_setValue | /**
* Sets the selected options for this checkbox group.
*
* @param options
* the list of options to select
*
* @see #getValue()
* @see #setValue(String...)
*/
public void setValue(List<String> options) {
// Deselect everything that is not going to be selected again.
getValue().stream().filte... | 3.68 |
hbase_ShadedAccessControlUtil_toPermissionAction | /**
* Convert a Permission.Action shaded proto to a client Permission.Action object.
*/
public static Permission.Action toPermissionAction(AccessControlProtos.Permission.Action action) {
switch (action) {
case READ:
return Permission.Action.READ;
case WRITE:
return Permission.Action.WRITE;
c... | 3.68 |
dubbo_ReflectUtils_makeAccessible | /**
* Copy from org.springframework.util.ReflectionUtils.
* Make the given method accessible, explicitly setting it accessible if
* necessary. The {@code setAccessible(true)} method is only called
* when actually necessary, to avoid unnecessary conflicts with a JVM
* SecurityManager (if active).
* @param method t... | 3.68 |
framework_AbstractJunctionFilter_getFilters | /**
* Returns an unmodifiable collection of the sub-filters of this composite
* filter.
*
* @return
*/
public Collection<Filter> getFilters() {
return filters;
} | 3.68 |
dubbo_ServiceBeanExportedEvent_getServiceBean | /**
* Get {@link ServiceBean} instance
*
* @return non-null
*/
public ServiceBean getServiceBean() {
return (ServiceBean) super.getSource();
} | 3.68 |
zxing_CameraConfigurationManager_initFromCameraParameters | /**
* Reads, one time, values from the camera that are needed by the app.
*/
void initFromCameraParameters(OpenCamera camera) {
Camera.Parameters parameters = camera.getCamera().getParameters();
WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = manager.g... | 3.68 |
framework_AbstractComponent_getActionManager | /**
* Gets the {@link ActionManager} used to manage the
* {@link ShortcutListener}s added to this component.
*
* @return the ActionManager in use
*/
protected ActionManager getActionManager() {
if (actionManager == null) {
actionManager = new ConnectorActionManager(this);
setActionManagerViewer... | 3.68 |
framework_VTabsheet_clearPaintables | /**
* {@inheritDoc}
*
* @deprecated This method is not called by the framework code anymore.
*/
@Deprecated
@Override
protected void clearPaintables() {
int i = tb.getTabCount();
while (i > 0) {
tb.removeTab(--i);
}
tabPanel.clear();
} | 3.68 |
morf_ColumnTypeBean_toString | /**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return String.format("ColumnType-%s-%d-%d-%s", type, width, scale, nullable);
} | 3.68 |
hudi_FileIOUtils_closeQuietly | /**
* Closes {@code Closeable} quietly.
*
* @param closeable {@code Closeable} to close
*/
public static void closeQuietly(Closeable closeable) {
if (closeable == null) {
return;
}
try {
closeable.close();
} catch (IOException e) {
LOG.warn("IOException during close", e);
}
} | 3.68 |
hadoop_CommitContext_getSinglePendingFileSerializer | /**
* Get a serializer for .pending files.
* @return a serializer.
*/
public JsonSerialization<SinglePendingCommit> getSinglePendingFileSerializer() {
return singleCommitSerializer.getForCurrentThread();
} | 3.68 |
pulsar_BrokerService_checkUnAckMessageDispatching | /**
* Adds given dispatcher's unackMessage count to broker-unack message count and if it reaches to the
* {@link #maxUnackedMessages} then it blocks all the dispatchers which has unack-messages higher than
* {@link #maxUnackedMsgsPerDispatcher}. It unblocks all dispatchers once broker-unack message counts decreased ... | 3.68 |
hadoop_BoundedResourcePool_toString | // For debugging purposes.
@Override
public synchronized String toString() {
return String.format(
"size = %d, #created = %d, #in-queue = %d, #available = %d",
size, numCreated(), items.size(), numAvailable());
} | 3.68 |
framework_Table_setSortContainerPropertyId | /**
* Internal method to set currently sorted column property id. With doSort
* flag actual sorting may be bypassed.
*
* @param propertyId
* @param doSort
*/
private void setSortContainerPropertyId(Object propertyId, boolean doSort) {
if ((sortContainerPropertyId != null
&& !sortContainerPropertyI... | 3.68 |
hbase_CellFlatMap_subMap | // ---------------- Sub-Maps ----------------
@Override
public NavigableMap<Cell, Cell> subMap(Cell fromKey, boolean fromInclusive, Cell toKey,
boolean toInclusive) {
final int lessCellIndex = getValidIndex(fromKey, fromInclusive, true);
final int greaterCellIndex = getValidIndex(toKey, toInclusive, false);
if ... | 3.68 |
morf_AbstractSqlDialectTest_testSelectWithLessThanWhereClauses | /**
* Tests a select with a simple where clause.
*/
@Test
public void testSelectWithLessThanWhereClauses() {
SelectStatement stmt = new SelectStatement()
.from(new TableReference(TEST_TABLE))
.where(lessThan(new FieldReference(INT_FIELD), 20090101));
String expectedSql = "SELECT * FROM " + tableName(TEST_TAB... | 3.68 |
flink_RestAPIVersion_getLatestVersion | /**
* Accept versions and one of them as a comparator, and get the latest one.
*
* @return latest version that implement RestAPIVersion interface>
*/
static <E extends RestAPIVersion<E>> E getLatestVersion(Collection<E> versions) {
return Collections.max(versions);
} | 3.68 |
hbase_RegionCoprocessorHost_prePut | /**
* Supports Coprocessor 'bypass'.
* @param put The Put object
* @param edit The WALEdit object.
* @return true if default processing should be bypassed
* @exception IOException Exception
*/
public boolean prePut(final Put put, final WALEdit edit) throws IOException {
if (coprocEnvironments.isEmpty()) {
... | 3.68 |
dubbo_MetricsEventBus_post | /**
* Full lifecycle post, success and failure conditions can be customized
*
* @param event event to post.
* @param targetSupplier original processing result supplier
* @param trFunction Custom event success criteria, judged according to the returned boolean type
* @param <T> Biz result t... | 3.68 |
querydsl_BeanMap_containsKey | /**
* Returns true if the bean defines a property with the given name.
* <p>
* The given name must be a {@code String}; if not, this method
* returns false. This method will also return false if the bean
* does not define a property with that name.
* <p>
* Write-only properties will not be matched as the test op... | 3.68 |
hudi_HoodieRowCreateHandle_createMarkerFile | /**
* Creates an empty marker file corresponding to storage writer path.
*
* @param partitionPath Partition path
*/
private static void createMarkerFile(String partitionPath,
String dataFileName,
String instantTime,
... | 3.68 |
framework_Range_startsAfter | /**
* Checks whether this range starts after the end of another range.
*
* @param other
* the other range to compare against
* @return <code>true</code> if this range starts after the
* <code>other</code>
*/
public boolean startsAfter(final Range other) {
return getStart() >= other.getEnd(... | 3.68 |
hadoop_OBSCommonUtils_objectRepresentsDirectory | /**
* Predicate: does the object represent a directory?.
*
* @param name object name
* @param size object size
* @return true if it meets the criteria for being an object
*/
public static boolean objectRepresentsDirectory(final String name,
final long size) {
return !name.isEmpty() && name.charAt(name.lengt... | 3.68 |
hbase_Procedure_setLastUpdate | /**
* Called on store load to initialize the Procedure internals after the creation/deserialization.
*/
protected void setLastUpdate(long lastUpdate) {
this.lastUpdate = lastUpdate;
} | 3.68 |
hbase_HBaseCommonTestingUtility_randomFreePort | /**
* Returns a random free port and marks that port as taken. Not thread-safe. Expected to be
* called from single-threaded test setup code/
*/
public int randomFreePort() {
int port = 0;
do {
port = randomPort();
if (takenRandomPorts.contains(port)) {
port = 0;
continue;
}
takenRand... | 3.68 |
framework_AbstractComponent_hasEqualHeight | /**
* Test if the given component has equal height with this instance
*
* @param component
* the component for the height comparison
* @return true if the heights are equal
*/
private boolean hasEqualHeight(Component component) {
return getHeight() == component.getHeight()
&& getHeightU... | 3.68 |
hbase_DirectMemoryUtils_getNettyDirectMemoryUsage | /** Returns the current amount of direct memory used by netty module. */
public static long getNettyDirectMemoryUsage() {
ByteBufAllocatorMetric metric =
((ByteBufAllocatorMetricProvider) PooledByteBufAllocator.DEFAULT).metric();
return metric.usedDirectMemory();
} | 3.68 |
hadoop_OBSDataBlocks_getOutstandingBufferCount | /**
* Get count of outstanding buffers.
*
* @return the current buffer count
*/
public int getOutstandingBufferCount() {
return BUFFERS_OUTSTANDING.get();
} | 3.68 |
hmily_MetricsReporter_recordTime | /**
* Record time by duration.
*
* @param name name
* @param duration duration
*/
public static void recordTime(final String name, final long duration) {
recordTime(name, null, duration);
} | 3.68 |
flink_JobVertex_setResources | /**
* Sets the minimum and preferred resources for the task.
*
* @param minResources The minimum resource for the task.
* @param preferredResources The preferred resource for the task.
*/
public void setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
this.minResources = checkNotNull(min... | 3.68 |
hudi_HoodieLazyInsertIterable_getTransformer | /**
* Transformer function to help transform a HoodieRecord. This transformer is used by BufferedIterator to offload some
* expensive operations of transformation to the reader thread.
*/
public <T> Function<HoodieRecord<T>, HoodieInsertValueGenResult<HoodieRecord>> getTransformer(Schema schema,
... | 3.68 |
framework_Form_getLayout | /**
* Gets the layout of the form.
*
* <p>
* By default form uses <code>OrderedLayout</code> with <code>form</code>
* -style.
* </p>
*
* @return the Layout of the form.
*/
public Layout getLayout() {
return (Layout) getState(false).layout;
} | 3.68 |
hbase_ConnectionCache_getTable | /**
* Caller closes the table afterwards.
*/
public Table getTable(String tableName) throws IOException {
ConnectionInfo connInfo = getCurrentConnection();
return connInfo.connection.getTable(TableName.valueOf(tableName));
} | 3.68 |
framework_AbstractComponentConnector_unregisterTouchHandlers | /**
* The new default behavior is for long taps to fire a contextclick event if
* there's a contextclick listener attached to the component.
*
* If you do not want this in your component, override this with a blank
* method to get rid of said behavior.
*
* @since 7.6
*/
protected void unregisterTouchHandlers() ... | 3.68 |
flink_SingleOutputStreamOperator_returns | /**
* Adds a type information hint about the return type of this operator. This method can be used
* in cases where Flink cannot determine automatically what the produced type of a function is.
* That can be the case if the function uses generic type variables in the return type that
* cannot be inferred from the i... | 3.68 |
flink_MessageParameter_getValueAsString | /**
* Returns the resolved value of this parameter as a string, or {@code null} if it isn't
* resolved yet.
*
* @return resolved value, or null if it wasn't resolved yet
*/
final String getValueAsString() {
return value == null ? null : convertToString(value);
} | 3.68 |
flink_UpdatingTopCityExample_createTemporaryDirectory | /** Creates an empty temporary directory for CSV files and returns the absolute path. */
private static String createTemporaryDirectory() throws IOException {
final Path tempDirectory = Files.createTempDirectory("population");
return tempDirectory.toString();
} | 3.68 |
hadoop_BaseRecord_validate | /**
* Validates the record. Called when the record is created, populated from the
* state store, and before committing to the state store. If validate failed,
* there throws an exception.
*/
public void validate() {
if (getDateCreated() <= 0) {
throw new IllegalArgumentException(ERROR_MSG_CREATION_TIME_NEGATI... | 3.68 |
flink_TwoInputUdfOperator_withForwardedFieldsSecond | /**
* Adds semantic information about forwarded fields of the second input of the user-defined
* function. The forwarded fields information declares fields which are never modified by the
* function and which are forwarded at the same position to the output or unchanged copied to
* another position in the output.
... | 3.68 |
hadoop_WorkloadMapper_configureJob | /**
* Setup input and output formats and optional reducer.
*/
public void configureJob(Job job) {
job.setInputFormatClass(VirtualInputFormat.class);
job.setNumReduceTasks(0);
job.setOutputKeyClass(NullWritable.class);
job.setOutputValueClass(NullWritable.class);
job.setOutputFormatClass(NullOutputFormat.cl... | 3.68 |
hadoop_SequenceFileAsTextRecordReader_nextKeyValue | /** Read key/value pair in a line. */
public synchronized boolean nextKeyValue()
throws IOException, InterruptedException {
if (!sequenceFileRecordReader.nextKeyValue()) {
return false;
}
if (key == null) {
key = new Text();
}
if (value == null) {
value = new Text();
}
key.set(sequenceF... | 3.68 |
hadoop_EntryStatus_toEntryStatus | /**
* Go from the result of a getFileStatus call or
* listing entry to a status.
* A null argument is mapped to {@link #not_found}
* @param st file status
* @return the status enum.
*/
public static EntryStatus toEntryStatus(@Nullable FileStatus st) {
if (st == null) {
return not_found;
}
if (st.isDire... | 3.68 |
pulsar_DataBlockHeaderImpl_fromStream | // Construct DataBlockHeader from InputStream, which contains `HEADER_MAX_SIZE` bytes readable.
public static DataBlockHeader fromStream(InputStream stream) throws IOException {
CountingInputStream countingStream = new CountingInputStream(stream);
DataInputStream dis = new DataInputStream(countingStream);
i... | 3.68 |
hbase_ProcedureExecutor_execProcedure | /**
* Executes <code>procedure</code>
* <ul>
* <li>Calls the doExecute() of the procedure
* <li>If the procedure execution didn't fail (i.e. valid user input)
* <ul>
* <li>...and returned subprocedures
* <ul>
* <li>The subprocedures are initialized.
* <li>The subprocedures are added to the store
* <li>The sub... | 3.68 |
flink_RocksDBStateDownloader_downloadDataForStateHandle | /** Copies the file from a single state handle to the given path. */
private void downloadDataForStateHandle(
Path restoreFilePath,
StreamStateHandle remoteFileHandle,
CloseableRegistry closeableRegistry)
throws IOException {
if (closeableRegistry.isClosed()) {
return;
}... | 3.68 |
flink_FactoryUtil_createDynamicTableSource | /**
* @deprecated Use {@link #createDynamicTableSource(DynamicTableSourceFactory, ObjectIdentifier,
* ResolvedCatalogTable, Map, ReadableConfig, ClassLoader, boolean)}
*/
@Deprecated
public static DynamicTableSource createDynamicTableSource(
@Nullable DynamicTableSourceFactory preferredFactory,
O... | 3.68 |
flink_FloatValue_setValue | /**
* Sets the value of the encapsulated primitive float.
*
* @param value the new value of the encapsulated primitive float.
*/
public void setValue(float value) {
this.value = value;
} | 3.68 |
morf_InsertStatement_isParameterisedInsert | /**
* Identifies whether this insert is a parameterised insert
* with no source table or select.
*
* @return true if this is a parameterised insert statement, false otherwise
*/
public boolean isParameterisedInsert() {
return fromTable == null && selectStatement == null && values.isEmpty();
} | 3.68 |
querydsl_AbstractSQLInsertClause_setBatchToBulk | /**
* Set whether batches should be optimized into a single bulk operation.
* Will revert to batches, if bulk is not supported
*/
public void setBatchToBulk(boolean b) {
this.batchToBulk = b && configuration.getTemplates().isBatchToBulkSupported();
} | 3.68 |
hbase_RpcServer_getServiceInterface | /**
* @param serviceName Some arbitrary string that represents a 'service'.
* @param services Available services and their service interfaces.
* @return Service interface class for <code>serviceName</code>
*/
protected static Class<?> getServiceInterface(final List<BlockingServiceAndInterface> services,
final ... | 3.68 |
hadoop_AbfsInputStreamStatisticsImpl_toString | /**
* String operator describes all the current statistics.
* <b>Important: there are no guarantees as to the stability
* of this value.</b>
*
* @return the current values of the stream statistics.
*/
@Override
public String toString() {
final StringBuilder sb = new StringBuilder(
"StreamStatistics{");
... | 3.68 |
hadoop_TFile_getKeyLength | /**
* Get the length of the key.
*
* @return the length of the key.
*/
public int getKeyLength() {
return klen;
} | 3.68 |
dubbo_ReflectUtils_resolveTypes | /**
* Resolve the types of the specified values
*
* @param values the values
* @return If can't be resolved, return {@link ReflectUtils#EMPTY_CLASS_ARRAY empty class array}
* @since 2.7.6
*/
public static Class[] resolveTypes(Object... values) {
if (isEmpty(values)) {
return EMPTY_CLASS_ARRAY;
}
... | 3.68 |
framework_LayoutDependencyTree_getScrollingBoundary | /**
* Returns the scrolling boundary for this component. If a cached value is
* available, the check isn't performed again. If no cached value exists,
* iterates through the component hierarchy until the closest parent that
* implements {@link MayScrollChildren} has been found.
*
* @param connector
* ... | 3.68 |
querydsl_AntMetaDataExporter_getCustomTypes | /**
* Gets a list of custom types
* @return a list of custom types
* @deprecated Use addCustomType instead
*/
public String[] getCustomTypes() {
String[] customTypes = new String[this.customTypes.size()];
for (int i = 0; i < this.customTypes.size(); i++) {
CustomType customType = this.customTypes.ge... | 3.68 |
open-banking-gateway_BaseDatasafeDbStorageService_write | /**
* Open Datasafe object for writing.
* @param withCallback Absolute path of the object to write to, including callback hook. I.e. {@code db://storage/deadbeef}
* @return Stream to write data to.
*/
@Override
@SneakyThrows
@Transactional
public OutputStream write(WithCallback<AbsoluteLocation, ? extends ResourceW... | 3.68 |
flink_ExceptionUtils_stripExecutionException | /**
* Unpacks an {@link ExecutionException} and returns its cause. Otherwise the given Throwable is
* returned.
*
* @param throwable to unpack if it is an ExecutionException
* @return Cause of ExecutionException or given Throwable
*/
public static Throwable stripExecutionException(Throwable throwable) {
retur... | 3.68 |
querydsl_AbstractMySQLQuery_into | /**
* SELECT ... INTO var_list selects column values and stores them into variables.
*
* @param var variable name
* @return the current object
*/
public C into(String var) {
return addFlag(Position.END, "\ninto " + var);
} | 3.68 |
hadoop_RawErasureEncoder_allowChangeInputs | /**
* Allow change into input buffers or not while perform encoding/decoding.
* @return true if it's allowed to change inputs, false otherwise
*/
public boolean allowChangeInputs() {
return coderOptions.allowChangeInputs();
} | 3.68 |
flink_SortUtil_maxNormalizedKey | /** Max unsigned byte is -1. */
public static void maxNormalizedKey(MemorySegment target, int offset, int numBytes) {
// write max value.
for (int i = 0; i < numBytes; i++) {
target.put(offset + i, (byte) -1);
}
} | 3.68 |
hadoop_BlockBlobInputStream_skip | /**
* Skips over and discards n bytes of data from this input stream.
* @param n the number of bytes to be skipped.
* @return the actual number of bytes skipped.
* @throws IOException IO failure
* @throws IndexOutOfBoundsException if n is negative or if the sum of n
* and the current value of getPos() is greater ... | 3.68 |
framework_VAbstractPopupCalendar_setFocus | /**
* Sets focus to Calendar panel.
*
* @param focus
* {@code true} for {@code focus}, {@code false} for {@code blur}
*/
public void setFocus(boolean focus) {
calendar.setFocus(focus);
} | 3.68 |
querydsl_ProjectableSQLQuery_unionAll | /**
* Creates an union expression for the given subqueries
*
* @param <RT>
* @param alias alias for union
* @param sq subqueries
* @return the current object
*/
@SuppressWarnings("unchecked")
public <RT> Q unionAll(Path<?> alias, SubQueryExpression<RT>... sq) {
return from((Expression) UnionUtils.union(Array... | 3.68 |
graphhopper_PointList_copy | /**
* This method does a deep copy of this object for the specified range.
*
* @param from the copying of the old PointList starts at this index
* @param end the copying of the old PointList ends at the index before (i.e. end is exclusive)
*/
public PointList copy(int from, int end) {
if (from > end)
... | 3.68 |
hadoop_PowerShellFencer_buildPSScript | /**
* Build a PowerShell script to kill a java.exe process in a remote machine.
*
* @param processName Name of the process to kill. This is an attribute in
* CommandLine.
* @param host Host where the process is.
* @return Path of the PowerShell script.
*/
private String buildPSScript(final Str... | 3.68 |
flink_AndCondition_getRight | /** @return One of the {@link IterativeCondition conditions} combined in this condition. */
public IterativeCondition<T> getRight() {
return right;
} | 3.68 |
flink_TimestampData_isCompact | /**
* Returns whether the timestamp data is small enough to be stored in a long of milliseconds.
*/
public static boolean isCompact(int precision) {
return precision <= 3;
} | 3.68 |
framework_BeanValidator_getMessage | /**
* Returns the interpolated error message for the given constraint violation
* using the locale specified for this validator.
*
* @param violation
* the constraint violation
* @param locale
* the used locale
* @return the localized error message
*/
protected String getMessage(Constrain... | 3.68 |
pulsar_NonPersistentTopic_close | /**
* Close this topic - close all producers and subscriptions associated with this topic.
*
* @param disconnectClients disconnect clients
* @param closeWithoutWaitingClientDisconnect don't wait for client disconnect and forcefully close managed-ledger
* @return Completable future indicating completion of close op... | 3.68 |
hbase_Get_hasFamilies | /**
* Method for checking if any families have been inserted into this Get
* @return true if familyMap is non empty false otherwise
*/
public boolean hasFamilies() {
return !this.familyMap.isEmpty();
} | 3.68 |
hbase_NettyServerCall_sendResponseIfReady | /**
* If we have a response, and delay is not set, then respond immediately. Otherwise, do not
* respond to client. This is called by the RPC code in the context of the Handler thread.
*/
@Override
public synchronized void sendResponseIfReady() throws IOException {
// set param null to reduce memory pressure
thi... | 3.68 |
hadoop_ReadBufferManager_testMimicFullUseAndAddFailedBuffer | /**
* Test method that can mimic no free buffers scenario and also add a ReadBuffer
* into completedReadList. This readBuffer will get picked up by TryEvict()
* next time a new queue request comes in.
* @param buf that needs to be added to completedReadlist
*/
@VisibleForTesting
void testMimicFullUseAndAddFailedBu... | 3.68 |
flink_JoinOperator_projectTuple12 | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
ProjectJoin<I1, I2, T... | 3.68 |
hadoop_MountdBase_startTCPServer | /* Start TCP server */
private void startTCPServer() {
tcpServer = new SimpleTcpServer(rpcProgram.getPort(),
rpcProgram, 1);
rpcProgram.startDaemons();
try {
tcpServer.run();
} catch (Throwable e) {
LOG.error("Failed to start the TCP server.", e);
if (tcpServer.getBoundPort() > 0) {
rpcP... | 3.68 |
hadoop_SaslOutputStream_close | /**
* Closes this output stream and releases any system resources associated with
* this stream.
*
* @exception IOException
* if an I/O error occurs.
*/
@Override
public void close() throws IOException {
disposeSasl();
outStream.close();
} | 3.68 |
hudi_HiveSchemaUtil_createHiveArray | /**
* Create an Array Hive schema from equivalent parquet list type.
*/
private static String createHiveArray(Type elementType, String elementName, boolean supportTimestamp, boolean doFormat) {
StringBuilder array = new StringBuilder();
array.append(doFormat ? "ARRAY< " : "ARRAY<");
if (elementType.isPrimitive(... | 3.68 |
zxing_BinaryBitmap_isRotateSupported | /**
* @return Whether this bitmap supports counter-clockwise rotation.
*/
public boolean isRotateSupported() {
return binarizer.getLuminanceSource().isRotateSupported();
} | 3.68 |
flink_TableResultImpl_resultKind | /**
* Specifies result kind of the execution result.
*
* @param resultKind a {@link ResultKind} for the execution result.
*/
public Builder resultKind(ResultKind resultKind) {
Preconditions.checkNotNull(resultKind, "resultKind should not be null");
this.resultKind = resultKind;
return this;
} | 3.68 |
morf_SqlDialect_getSqlForSubstring | /**
* Converts the substring function into SQL.
*
* @param function the function details
* @return a string representation of the SQL
*/
protected String getSqlForSubstring(Function function) {
return getSubstringFunctionName() + "("
+ getSqlFrom(function.getArguments().get(0)) + ", "
+ getSqlFrom(fu... | 3.68 |
hudi_HoodieTableMetadataUtil_convertFilesToFilesPartitionRecords | /**
* Convert rollback action metadata to files partition records.
*/
protected static List<HoodieRecord> convertFilesToFilesPartitionRecords(Map<String, List<String>> partitionToDeletedFiles,
Map<String, Map<String, Long>> partitionToAppendedFil... | 3.68 |
hadoop_HdfsDtFetcher_getServiceName | /**
* Returns the service name for HDFS, which is also a valid URL prefix.
*/
public Text getServiceName() {
return new Text(SERVICE_NAME);
} | 3.68 |
morf_UpgradeStatusTableServiceImpl_writeStatusFromStatus | /**
* @see org.alfasoftware.morf.upgrade.UpgradeStatusTableService#writeStatusFromStatus(org.alfasoftware.morf.upgrade.UpgradeStatus, org.alfasoftware.morf.upgrade.UpgradeStatus)
*/
@Override
public int writeStatusFromStatus(UpgradeStatus fromStatus, UpgradeStatus toStatus) {
List<String> script = updateTableScript... | 3.68 |
hbase_Procedure_setStackIndexes | /**
* Called on store load to initialize the Procedure internals after the creation/deserialization.
*/
protected synchronized void setStackIndexes(final List<Integer> stackIndexes) {
this.stackIndexes = new int[stackIndexes.size()];
for (int i = 0; i < this.stackIndexes.length; ++i) {
this.stackIndexes[i] = ... | 3.68 |
morf_Function_averageDistinct | /**
* Helper method to create an instance of the "average(distinct)" SQL function.
*
* @param field the field to evaluate in the average function.
* @return an instance of a average function.
*/
public static Function averageDistinct(AliasedField field) {
return new Function(FunctionType.AVERAGE_DISTINCT, field)... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.