name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_AMRMClientAsyncImpl_unregisterApplicationMaster | /**
* Unregister the application master. This must be called in the end.
* @param appStatus Success/Failure status of the master
* @param appMessage Diagnostics message on failure
* @param appTrackingUrl New URL to get master info
* @throws YarnException
* @throws IOException
*/
public void unregisterApplication... | 3.68 |
hudi_ImmutableTriple_getLeft | /**
* {@inheritDoc}
*/
@Override
public L getLeft() {
return left;
} | 3.68 |
querydsl_SimpleExpression_in | /**
* Create a {@code this in right} expression
*
* @param right rhs of the comparison
* @return this in right
*/
public BooleanExpression in(Expression<? extends T>... right) {
return Expressions.booleanOperation(Ops.IN, mixin, Expressions.set(right));
} | 3.68 |
morf_FieldReference_getName | /**
* Gets the name of the field.
*
* @return the name
*/
public String getName() {
return name;
} | 3.68 |
flink_SerializedJobExecutionResult_getNetRuntime | /**
* Gets the net execution time of the job, i.e., the execution time in the parallel system,
* without the pre-flight steps like the optimizer in a desired time unit.
*
* @param desiredUnit the unit of the <tt>NetRuntime</tt>
* @return The net execution time in the desired unit.
*/
public long getNetRuntime(Tim... | 3.68 |
framework_Table_getConverter | /**
* Returns the converter used to format the given propertyId.
*
* @param propertyId
* The propertyId to check
* @return The converter used to format the propertyId or null if no
* converter has been set
*/
public Converter<String, Object> getConverter(Object propertyId) {
return propert... | 3.68 |
flink_ExecutionConfig_setMaxParallelism | /**
* Sets the maximum degree of parallelism defined for the program.
*
* <p>The maximum degree of parallelism specifies the upper limit for dynamic scaling. It also
* defines the number of key groups used for partitioned state.
*
* @param maxParallelism Maximum degree of parallelism to be used for the program.
... | 3.68 |
framework_DragSourceExtension_addDragEndListener | /**
* Attaches dragend listener for the current drag source.
* {@link DragEndListener#dragEnd(DragEndEvent)} is called when dragend
* event happens on the client side.
*
* @param listener
* Listener to handle dragend event.
* @return Handle to be used to remove this listener.
*/
public Registration a... | 3.68 |
flink_SplitFetcherManager_maybeShutdownFinishedFetchers | /**
* Check and shutdown the fetchers that have completed their work.
*
* @return true if all the fetchers have completed the work, false otherwise.
*/
public boolean maybeShutdownFinishedFetchers() {
Iterator<Map.Entry<Integer, SplitFetcher<E, SplitT>>> iter = fetchers.entrySet().iterator();
while (iter.ha... | 3.68 |
flink_PekkoRpcActor_handleRunAsync | /**
* Handle asynchronous {@link Runnable}. This method simply executes the given {@link Runnable}
* in the context of the actor thread.
*
* @param runAsync Run async message
*/
private void handleRunAsync(RunAsync runAsync) {
final long timeToRun = runAsync.getTimeNanos();
final long delayNanos;
if (... | 3.68 |
flink_SinkContextUtil_forTimestamp | /**
* Creates a {@link SinkFunction.Context} that throws an exception when trying to access the
* current watermark or processing time.
*/
public static SinkFunction.Context forTimestamp(long timestamp) {
return new SinkFunction.Context() {
@Override
public long currentProcessingTime() {
... | 3.68 |
framework_VaadinService_isAtmosphereAvailable | /**
* Checks whether Atmosphere is available for use.
*
* @since 7.6
* @return true if Atmosphere is available, false otherwise
*/
protected boolean isAtmosphereAvailable() {
if (atmosphereAvailable == null) {
atmosphereAvailable = checkAtmosphereSupport();
}
return atmosphereAvailable;
} | 3.68 |
framework_Escalator_scrollToSpacer | /**
* Scrolls the body vertically so that the spacer at the given row index is
* visible and there is at least {@literal padding} pixesl to the given
* scroll destination.
*
* @since 7.5.0
* @param spacerIndex
* the row index of the spacer to scroll to
* @param destination
* where the spa... | 3.68 |
hbase_ServerRpcConnection_setupCellBlockCodecs | /**
* Set up cell block codecs
*/
private void setupCellBlockCodecs() throws FatalConnectionException {
// TODO: Plug in other supported decoders.
if (!connectionHeader.hasCellBlockCodecClass()) {
return;
}
String className = connectionHeader.getCellBlockCodecClass();
if (className == null || className.... | 3.68 |
hbase_ByteBuff_readCompressedInt | /** Read integer from ByteBuff coded in 7 bits and increment position. */
public static int readCompressedInt(ByteBuff buf) {
byte b = buf.get();
if ((b & ByteBufferUtils.NEXT_BIT_MASK) != 0) {
return (b & ByteBufferUtils.VALUE_MASK)
+ (readCompressedInt(buf) << ByteBufferUtils.NEXT_BIT_SHIFT);
}
retu... | 3.68 |
hbase_StoreFileTrackerValidationUtils_checkForNewFamily | // should not use MigrationStoreFileTracker for new family
private static void checkForNewFamily(Configuration conf, TableDescriptor table,
ColumnFamilyDescriptor family) throws IOException {
Configuration mergedConf = StoreUtils.createStoreConfiguration(conf, table, family);
Class<? extends StoreFileTracker> tra... | 3.68 |
flink_HiveParallelismInference_infer | /**
* Infer parallelism by number of files and number of splits. If {@link
* HiveOptions#TABLE_EXEC_HIVE_INFER_SOURCE_PARALLELISM} is not set this method does nothing.
*/
HiveParallelismInference infer(
SupplierWithException<Integer, IOException> numFiles,
SupplierWithException<Integer, IOException> ... | 3.68 |
framework_ValoColorPickerTestUI_updateDisplay | // This is called whenever a colorpicker popup is closed
/**
* Update display.
*
* @param fg
* the fg
* @param bg
* the bg
*/
public void updateDisplay(Color fg, Color bg) {
java.awt.Color awtFg = new java.awt.Color(fg.getRed(), fg.getGreen(),
fg.getBlue());
java.awt.Col... | 3.68 |
streampipes_DataStreamApi_subscribe | /**
* Subscribe to a data stream
*
* @param stream The data stream to subscribe to
* @param kafkaConfig Additional kafka settings which will override the default value (see docs)
* @param callback The callback where events will be received
*/
@Override
public ISubscription subscribe(SpDataStream stream,
... | 3.68 |
dubbo_DynamicConfiguration_getDefaultGroup | /**
* Get the default group for the operations
*
* @return The default value is {@link #DEFAULT_GROUP "dubbo"}
* @since 2.7.5
*/
default String getDefaultGroup() {
return DEFAULT_GROUP;
} | 3.68 |
hbase_TerminatedWrapper_skip | /**
* Skip {@code src}'s position forward over one encoded value.
* @param src the buffer containing the encoded value.
* @return number of bytes skipped.
* @throws IllegalArgumentException when the terminator sequence is not found.
*/
@Override
public int skip(PositionedByteRange src) {
if (wrapped.isSkippable(... | 3.68 |
framework_AbstractComponent_getDefaultAttributes | /**
* Returns a collection of attributes that do not require custom handling
* when reading or writing design. These are typically attributes of some
* primitive type. The default implementation searches setters with
* primitive values
*
* @return a collection of attributes that can be read and written using the
... | 3.68 |
flink_FileCatalogStore_removeCatalog | /**
* Removes the specified catalog from the catalog store.
*
* @param catalogName the name of the catalog to remove
* @param ignoreIfNotExists whether to ignore if the catalog does not exist in the catalog store
* @throws CatalogException if the catalog store is not open or if there is an error removing
* th... | 3.68 |
hadoop_BalanceProcedureScheduler_findJob | /**
* Find job in scheduler.
*
* @return the job in scheduler. Null if the schedule has no job with the
* same id.
*/
public BalanceJob findJob(BalanceJob job) {
BalanceJob found = null;
for (BalanceJob j : jobSet.keySet()) {
if (j.getId().equals(job.getId())) {
found = j;
break;
}
... | 3.68 |
pulsar_IOUtils_confirmPrompt | /**
* Confirm prompt for the console operations.
*
* @param prompt
* Prompt message to be displayed on console
* @return Returns true if confirmed as 'Y', returns false if confirmed as 'N'
* @throws IOException
*/
public static boolean confirmPrompt(String prompt) throws IOException {
while (true)... | 3.68 |
hadoop_HsController_task | /*
* (non-Javadoc)
* @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#task()
*/
@Override
public void task() {
super.task();
} | 3.68 |
flink_IOUtils_closeAll | /**
* Closes all {@link AutoCloseable} objects in the parameter, suppressing exceptions. Exception
* will be emitted after calling close() on every object.
*
* @param closeables iterable with closeables to close.
* @param suppressedException class of exceptions which should be suppressed during the closing.
* @th... | 3.68 |
flink_MemorySegment_getDouble | /**
* Reads a double-precision floating point value (64bit, 8 bytes) from the given position, in
* the system's native byte order. This method offers the best speed for double reading and
* should be used unless a specific byte order is required. In most cases, it suffices to know
* that the byte order in which the... | 3.68 |
hbase_ScannerModel_getCaching | /** Returns the number of rows that the scanner to fetch at once */
@XmlAttribute
public int getCaching() {
return caching;
} | 3.68 |
querydsl_CurveExpression_length | /**
* The length of this Curve in its associated spatial reference.
*
* @return length
*/
public NumberExpression<Double> length() {
if (length == null) {
length = Expressions.numberOperation(Double.class, SpatialOps.LENGTH, mixin);
}
return length;
} | 3.68 |
hadoop_OBSFileSystem_isObsClientDFSListEnable | /**
* Return a flag that indicates if OBS client specific depth first search
* (DFS) list is enabled.
*
* @return the flag
*/
boolean isObsClientDFSListEnable() {
return obsClientDFSListEnable;
} | 3.68 |
pulsar_ProducerConfiguration_getMessageRouter | /**
* Get the message router set by {@link #setMessageRouter(MessageRouter)}.
*
* @return message router set by {@link #setMessageRouter(MessageRouter)}.
*/
public MessageRouter getMessageRouter() {
return conf.getCustomMessageRouter();
} | 3.68 |
framework_VScrollTable_disableBrowserIntelligence | /**
* Disable browser measurement of the table width.
*/
public void disableBrowserIntelligence() {
hTableContainer.getStyle().setWidth(WRAPPER_WIDTH, Unit.PX);
} | 3.68 |
hudi_FlinkTables_createTable | /**
* Creates the hoodie flink table.
*
* <p>This expects to be used by driver.
*/
public static HoodieFlinkTable<?> createTable(Configuration conf) {
HoodieWriteConfig writeConfig = FlinkWriteClients.getHoodieClientConfig(conf, true, false);
return HoodieFlinkTable.create(writeConfig, HoodieFlinkEngineContext.... | 3.68 |
hudi_HoodieHeartbeatUtils_isHeartbeatExpired | /**
* Whether a heartbeat is expired.
*
* @param instantTime Instant time.
* @param maxAllowableHeartbeatIntervalInMs Heartbeat timeout in milliseconds.
* @param fs {@link FileSystem} instance.
* @param basePath Base path of the table.
... | 3.68 |
AreaShop_RentRegion_setRenter | /**
* Set the renter of this region.
* @param renter The UUID of the player that should be set as the renter
*/
public void setRenter(UUID renter) {
if(renter == null) {
setSetting("rent.renter", null);
setSetting("rent.renterName", null);
} else {
setSetting("rent.renter", renter.toString());
setSetting("... | 3.68 |
hadoop_OBSBlockOutputStream_write | /**
* Writes a range of bytes from to the memory buffer. If this causes the
* buffer to reach its limit, the actual upload is submitted to the threadpool
* and the remainder of the array is written to memory (recursively).
*
* @param source byte array containing
* @param offset offset in array where to start
* @... | 3.68 |
hbase_AuthResult_concatenateExtraParams | /** Returns extra parameter key/value string */
private String concatenateExtraParams() {
final StringBuilder sb = new StringBuilder();
boolean first = true;
for (Entry<String, String> entry : extraParams.entrySet()) {
if (entry.getKey() != null && entry.getValue() != null) {
if (!first) {
sb.ap... | 3.68 |
flink_SlotProfile_getPhysicalSlotResourceProfile | /** Returns the desired resource profile for the physical slot to host this task slot. */
public ResourceProfile getPhysicalSlotResourceProfile() {
return physicalSlotResourceProfile;
} | 3.68 |
hadoop_BalanceProcedureScheduler_recoverAllJobs | /**
* Search all jobs and add them to recoverQueue. It's called once after the
* scheduler starts.
*/
private void recoverAllJobs() throws IOException {
BalanceJob[] jobs = journal.listAllJobs();
for (BalanceJob job : jobs) {
recoverQueue.add(job);
jobSet.put(job, job);
LOG.info("Recover federation b... | 3.68 |
flink_CopyOnWriteStateMap_releaseSnapshot | /**
* Releases a snapshot for this {@link CopyOnWriteStateMap}. This method should be called once a
* snapshot is no more needed, so that the {@link CopyOnWriteStateMap} can stop considering this
* snapshot for copy-on-write, thus avoiding unnecessary object creation.
*
* @param snapshotToRelease the snapshot to r... | 3.68 |
morf_UpdateStatement_getFields | /**
* Gets the list of fields
*
* @return the fields
*/
public List<AliasedField> getFields() {
return fields;
} | 3.68 |
hudi_InternalSchemaChangeApplier_applyColumnNullabilityChange | /**
* Update col nullability for hudi table.
*
* @param colName col name to be changed. if we want to change col from a nested filed, the fullName should be specify
* @param nullable .
*/
public InternalSchema applyColumnNullabilityChange(String colName, boolean nullable) {
TableChanges.ColumnUpdateChange update... | 3.68 |
hudi_ExpressionPredicates_getFunctionDefinition | /**
* Returns function definition of predicate.
*
* @return A function definition of predicate.
*/
public FunctionDefinition getFunctionDefinition() {
return null;
} | 3.68 |
hbase_AsyncTableRegionLocator_getRegionLocations | /**
* Find all the replicas for the region on which the given row is being served.
* @param row Row to find.
* @return Locations for all the replicas of the row.
*/
default CompletableFuture<List<HRegionLocation>> getRegionLocations(byte[] row) {
return getRegionLocations(row, false);
} | 3.68 |
flink_ThrowingRunnable_unchecked | /**
* Converts a {@link ThrowingRunnable} into a {@link Runnable} which throws all checked
* exceptions as unchecked.
*
* @param throwingRunnable to convert into a {@link Runnable}
* @return {@link Runnable} which throws all checked exceptions as unchecked.
*/
static Runnable unchecked(ThrowingRunnable<?> throwin... | 3.68 |
framework_Calendar_isEventCaptionAsHtml | /**
* Checks whether event captions are rendered as HTML
* <p>
* The default is false, i.e. to render that caption as plain text.
*
* @return true if the captions are rendered as HTML, false if rendered as
* plain text
*/
public boolean isEventCaptionAsHtml() {
return getState(false).eventCaptionAsHt... | 3.68 |
morf_Function_leftPad | /**
* Convenience helper method to create an instance of the <code>LPAD</code> SQL function.
* <p>Pads the <code>character</code> on the left of <code>field</code> so that the size equals <code>length</code></p>
* <p>The field should be of type {@link org.alfasoftware.morf.metadata.DataType#STRING}</p>
*
* @param ... | 3.68 |
zilla_ManyToOneRingBuffer_commit | /**
* {@inheritDoc}
*/
public void commit(final int index)
{
final int recordIndex = computeRecordIndex(index);
final AtomicBuffer buffer = this.buffer;
final int recordLength = verifyClaimedSpaceNotReleased(buffer, recordIndex);
buffer.putIntOrdered(lengthOffset(recordIndex), -recordLength);
} | 3.68 |
hadoop_RollingWindow_isStaleNow | /**
* Check whether the last time that the bucket was updated is no longer
* covered by rolling window.
*
* @param time the current time
* @return true if the bucket state is stale
*/
boolean isStaleNow(long time) {
long utime = updateTime.get();
return (utime == -1) || (time - utime >= windowLenMs);
} | 3.68 |
hadoop_OBSLoginHelper_extractLoginDetailsWithWarnings | /**
* Extract the login details from a URI, logging a warning if the URI contains
* these.
*
* @param name URI of the filesystem
* @return a login tuple, possibly empty.
*/
public static Login extractLoginDetailsWithWarnings(final URI name) {
Login login = extractLoginDetails(name);
if (login.hasLogin()) {
... | 3.68 |
flink_ExecutionFailureHandler_getGlobalFailureHandlingResult | /**
* Return result of failure handling on a global failure. Can be a set of task vertices to
* restart and a delay of the restarting. Or that the failure is not recoverable and the reason
* for it.
*
* @param cause of the task failure
* @param timestamp of the task failure
* @return result of the failure handli... | 3.68 |
hbase_HFileBlock_getBufferReadOnly | /**
* Returns a read-only duplicate of the buffer this block stores internally ready to be read.
* Clients must not modify the buffer object though they may set position and limit on the
* returned buffer since we pass back a duplicate. This method has to be public because it is used
* in {@link CompoundBloomFilter... | 3.68 |
zxing_CaptureActivity_handleDecodeInternally | // Put up our own UI for how to handle the decoded contents.
private void handleDecodeInternally(Result rawResult, ResultHandler resultHandler, Bitmap barcode) {
maybeSetClipboard(resultHandler);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (resultHandler.getDefaultButtonID... | 3.68 |
morf_H2Dialect_indexDeploymentStatements | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#indexDeploymentStatements(org.alfasoftware.morf.metadata.Table,
* org.alfasoftware.morf.metadata.Index)
*/
@Override
protected Collection<String> indexDeploymentStatements(Table table, Index index) {
StringBuilder statement = new StringBuilder();
statement.a... | 3.68 |
hbase_FilterBase_filterAllRemaining | /**
* Filters that never filter all remaining can inherit this implementation that never stops the
* filter early. {@inheritDoc}
*/
@Override
public boolean filterAllRemaining() throws IOException {
return false;
} | 3.68 |
framework_StringToLongConverter_convertToModel | /*
* (non-Javadoc)
*
* @see
* com.vaadin.data.util.converter.Converter#convertToModel(java.lang.Object,
* java.lang.Class, java.util.Locale)
*/
@Override
public Long convertToModel(String value, Class<? extends Long> targetType,
Locale locale) throws ConversionException {
Number n = convertToNumber(va... | 3.68 |
framework_AbstractOrderedLayoutConnector_hasTooltip | /*
* (non-Javadoc)
*
* @see com.vaadin.client.ui.AbstractComponentConnector#hasTooltip()
*/
@Override
public boolean hasTooltip() {
/*
* Tooltips are fetched from child connectors -> there's no quick way of
* checking whether there might a tooltip hiding somewhere
*/
return true;
} | 3.68 |
rocketmq-connect_MemoryClusterManagementServiceImpl_registerListener | /**
* Register a worker status listener to listen the change of alive workers.
*
* @param listener
*/
@Override
public void registerListener(WorkerStatusListener listener) {
} | 3.68 |
hibernate-validator_UUIDValidator_extractVersion | /**
* Get the 4 bit UUID version from the current value
*
* @param version The old version (in case the version has already been extracted)
* @param index The index of the current value to find the version to extract
* @param value The numeric value at the character position
*/
private static int extractVersion(i... | 3.68 |
pulsar_LoadManagerShared_shouldAntiAffinityNamespaceUnload | /**
*
* It checks if given anti-affinity namespace should be unloaded by broker due to load-shedding. If all the brokers
* are owning same number of anti-affinity namespaces then unloading this namespace again ends up at the same broker
* from which it was unloaded. So, this util checks that given namespace should ... | 3.68 |
flink_MapNode_computeOperatorSpecificDefaultEstimates | /**
* Computes the estimates for the Map operator. We assume that by default, Map takes one value
* and transforms it into another value. The cardinality consequently stays the same.
*/
@Override
protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics) {
this.estimatedNumRecords = getPre... | 3.68 |
flink_SqlFunctionUtils_sround | /** SQL <code>ROUND</code> operator applied to DecimalData values. */
public static DecimalData sround(DecimalData b0, int b1) {
return DecimalDataUtils.sround(b0, b1);
} | 3.68 |
flink_ObjectIdentifier_toObjectPath | /**
* Convert this {@link ObjectIdentifier} to {@link ObjectPath}.
*
* @throws TableException if the identifier cannot be converted
*/
public ObjectPath toObjectPath() throws TableException {
if (catalogName == null) {
throw new TableException(
"This ObjectIdentifier instance refers to a... | 3.68 |
morf_SqlDialect_addTableFromStatementsWithCasting | /**
* Generates the SQL to create a table and insert the data specified in the {@link SelectStatement}.
*
* For supported dialects, this method casts each field in the provided select using the column definition of the provided table.
*
* Validation is performed to confirm that the fields included in the select st... | 3.68 |
hbase_FilterBase_filterRow | /**
* Filters that never filter by rows based on previously gathered state from
* {@link #filterCell(Cell)} can inherit this implementation that never filters a row.
* {@inheritDoc}
*/
@Override
public boolean filterRow() throws IOException {
return false;
} | 3.68 |
flink_UpsertTestSinkBuilder_setOutputFile | /**
* Sets the output {@link File} to write to.
*
* @param outputFile
* @return {@link UpsertTestSinkBuilder}
*/
public UpsertTestSinkBuilder<IN> setOutputFile(File outputFile) {
this.outputFile = checkNotNull(outputFile);
return this;
} | 3.68 |
flink_PythonConfigUtil_extractPythonConfiguration | /** Extract the configurations which is used in the Python operators. */
public static Configuration extractPythonConfiguration(
List<Tuple2<String, DistributedCache.DistributedCacheEntry>> cachedFiles,
ReadableConfig config) {
final Configuration pythonDependencyConfig =
PythonDependenc... | 3.68 |
hbase_PermissionStorage_getUserTablePermissions | /**
* Returns the currently granted permissions for a given table as the specified user plus
* associated permissions.
*/
public static List<UserPermission> getUserTablePermissions(Configuration conf,
TableName tableName, byte[] cf, byte[] cq, String userName, boolean hasFilterUser)
throws IOException {
return... | 3.68 |
hbase_CellUtil_isPut | /** Returns True if this cell is a Put. */
@SuppressWarnings("deprecation")
public static boolean isPut(Cell cell) {
return cell.getTypeByte() == KeyValue.Type.Put.getCode();
} | 3.68 |
flink_Tuple6_toString | /**
* Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5), where the
* individual fields are the value returned by calling {@link Object#toString} on that field.
*
* @return The string representation of the tuple.
*/
@Override
public String toString() {
return "("
+ St... | 3.68 |
hadoop_WriteOperationHelper_finalizeMultipartUpload | /**
* Finalize a multipart PUT operation.
* This completes the upload, and, if that works, calls
* {@link S3AFileSystem#finishedWrite(String, long, String, String, org.apache.hadoop.fs.s3a.impl.PutObjectOptions)}
* to update the filesystem.
* Retry policy: retrying, translated.
* @param destKey destination of the... | 3.68 |
pulsar_BrokerInterceptor_txnOpened | /**
* Intercept when a transaction begins.
*
* @param tcId Transaction Coordinator Id
* @param txnID Transaction ID
*/
default void txnOpened(long tcId, String txnID) {
} | 3.68 |
framework_Window_getTabStopBottomAssistiveText | /**
* Gets the message that is provided to users of assistive devices when the
* user reaches the bottom of the window when leaving a window with the tab
* key is prevented.
*
* @return the bottom message
*/
public String getTabStopBottomAssistiveText() {
return getState(false).assistiveTabStopBottomText;
} | 3.68 |
hbase_KeyValue_toStringMap | /**
* Produces a string map for this key/value pair. Useful for programmatic use and manipulation of
* the data stored in an WALKey, for example, printing as JSON. Values are left out due to their
* tendency to be large. If needed, they can be added manually.
* @return the Map<String,?> containing data from t... | 3.68 |
hadoop_NoopAuditManagerS3A_checkAccess | /**
* Forward to the auditor.
* @param path path to check
* @param status status of the path.
* @param mode access mode.
* @throws IOException failure
*/
@Override
public boolean checkAccess(final Path path,
final S3AFileStatus status,
final FsAction mode)
throws IOException {
return auditor.checkAc... | 3.68 |
framework_Escalator_recalculateScrollbarsForVirtualViewport | /**
* Recalculates the virtual viewport represented by the scrollbars, so
* that the sizes of the scroll handles appear correct in the browser
*/
public void recalculateScrollbarsForVirtualViewport() {
double scrollContentHeight = body.calculateTotalRowHeight()
+ body.spacerContainer.getSpacerHeights... | 3.68 |
flink_AbstractMultipleInputTransformation_getOperatorFactory | /** Returns the {@code StreamOperatorFactory} of this Transformation. */
public StreamOperatorFactory<OUT> getOperatorFactory() {
return operatorFactory;
} | 3.68 |
zxing_PDF417_setEncoding | /**
* @param encoding sets character encoding to use
*/
public void setEncoding(Charset encoding) {
this.encoding = encoding;
} | 3.68 |
graphhopper_Helper_intToEle | /**
* Converts the integer value retrieved from storage into elevation (in meters). Do not expect
* more precision than meters although it currently is!
*/
public static double intToEle(int integEle) {
if (integEle == Integer.MAX_VALUE)
return Double.MAX_VALUE;
return integEle / ELE_FACTOR;
} | 3.68 |
flink_ZooKeeperUtils_createCheckpointIDCounter | /**
* Creates a {@link ZooKeeperCheckpointIDCounter} instance.
*
* @param client The {@link CuratorFramework} ZooKeeper client to use
* @return {@link ZooKeeperCheckpointIDCounter} instance
*/
public static ZooKeeperCheckpointIDCounter createCheckpointIDCounter(CuratorFramework client) {
return new ZooKeeperCh... | 3.68 |
framework_FilesystemContainer_removeAllItems | /*
* (non-Javadoc)
*
* @see com.vaadin.data.Container#removeAllItems()
*/
@Override
public boolean removeAllItems() throws UnsupportedOperationException {
throw new UnsupportedOperationException(
"File system container does not support this operation");
} | 3.68 |
morf_AbstractSqlDialectTest_testAlterRemoveColumnFromCompositeKey | /**
* Test changing a column to remove it from a composite primary key.
*/
@Test
public void testAlterRemoveColumnFromCompositeKey() {
testAlterTableColumn(COMPOSITE_PRIMARY_KEY_TABLE,
AlterationType.ALTER,
getColumn(COMPOSITE_PRIMARY_KEY_TABLE, SECOND_PRIMARY_KEY),
column(SECOND_PRIMARY_KEY, DataType.S... | 3.68 |
hadoop_AbstractDelegationTokenBinding_deployUnbonded | /**
* Perform any actions when deploying unbonded, and return a list
* of credential providers.
* @return non-empty list of AWS credential providers to use for
* authenticating this client with AWS services.
* @throws IOException any failure.
* @throws UnsupportedOperationException in the base implementation.
*/... | 3.68 |
hibernate-validator_ExecutableMetaData_assertCorrectnessOfConfiguration | /**
* <p>
* Checks the configuration of this method for correctness as per the
* rules outlined in the Bean Validation specification, section 4.5.5
* ("Method constraints in inheritance hierarchies").
* </p>
* <p>
* In particular, overriding methods in sub-types may not add parameter
* constraints and the retur... | 3.68 |
hadoop_JobBase_getReport | /**
* log the counters
*
*/
protected String getReport() {
StringBuffer sb = new StringBuffer();
Iterator iter = this.longCounters.entrySet().iterator();
while (iter.hasNext()) {
Entry e = (Entry) iter.next();
sb.append(e.getKey().toString()).append("\t").append(e.getValue())
.append("\n");
}... | 3.68 |
hadoop_AbfsConfiguration_getAccountSpecificClass | /**
* Returns the account-specific class if it exists, else returns default value.
* @param name Account-agnostic configuration key
* @param defaultValue Class returned if none is configured
* @param xface Interface shared by all possible values
* @param <U> Interface class type
* @return Account specific Class o... | 3.68 |
morf_SchemaUtils_autoNumbered | /**
* @see org.alfasoftware.morf.metadata.SchemaUtils.ColumnBuilder#autoNumbered(int)
*/
@Override
public ColumnBuilder autoNumbered(int from) {
return new ColumnBuilderImpl(this, isNullable(), getDefaultValue(), isPrimaryKey(), true, from);
} | 3.68 |
flink_SourceReader_pauseOrResumeSplits | /**
* Pauses or resumes reading of individual source splits.
*
* <p>Note that no other methods can be called in parallel, so updating subscriptions can be
* done atomically. This method is simply providing connectors with more expressive APIs the
* opportunity to update all subscriptions at once.
*
* <p>This is ... | 3.68 |
flink_InputChannel_getChannelInfo | /**
* Returns the info of this channel, which uniquely identifies the channel in respect to its
* operator instance.
*/
public InputChannelInfo getChannelInfo() {
return channelInfo;
} | 3.68 |
flink_ResourceCounter_getResources | /**
* Gets all stored {@link ResourceProfile ResourceProfiles}.
*
* @return collection of stored {@link ResourceProfile ResourceProfiles}
*/
public Set<ResourceProfile> getResources() {
return resources.keySet();
} | 3.68 |
morf_MySqlDialect_changePrimaryKeyColumns | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#changePrimaryKeyColumns(Table, List, List)
*/
@Override
public Collection<String> changePrimaryKeyColumns(Table table, List<String> oldPrimaryKeyColumns, List<String> newPrimaryKeyColumns) {
ArrayList<String> result = Lists.newArrayList();
if (!oldPrimaryKeyColum... | 3.68 |
flink_QueryableStateConfiguration_disabled | /** Gets the configuration describing the queryable state as deactivated. */
public static QueryableStateConfiguration disabled() {
final Iterator<Integer> proxyPorts =
NetUtils.getPortRangeFromString(
QueryableStateOptions.PROXY_PORT_RANGE.defaultValue());
final Iterator<Integer... | 3.68 |
hbase_SyncReplicationReplayWALManager_addUsedPeerWorker | /**
* Will only be called when loading procedures, where we need to construct the used worker set for
* each peer.
*/
public void addUsedPeerWorker(String peerId, ServerName worker) {
usedWorkersByPeer.get(peerId).used(worker);
} | 3.68 |
flink_RpcEndpoint_start | /**
* Triggers start of the rpc endpoint. This tells the underlying rpc server that the rpc
* endpoint is ready to process remote procedure calls.
*/
public final void start() {
rpcServer.start();
} | 3.68 |
hbase_ReplicationPeer_trackPeerConfigChanges | /**
* @deprecated since 2.1.0 and will be removed in 4.0.0. Use
* {@link #registerPeerConfigListener(ReplicationPeerConfigListener)} instead.
* @see #registerPeerConfigListener(ReplicationPeerConfigListener)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-10573">HBASE-19573</a>
*/
@Deprecat... | 3.68 |
flink_TumblingWindowAssigner_of | /**
* Creates a new {@code TumblingWindowAssigner} {@link WindowAssigner} that assigns elements to
* time windows based on the element timestamp.
*
* @param size The size of the generated windows.
* @return The time policy.
*/
public static TumblingWindowAssigner of(Duration size) {
return new TumblingWindowA... | 3.68 |
framework_AbstractOrderedLayout_getComponentCount | /**
* Gets the number of contained components. Consistent with the iterator
* returned by {@link #getComponentIterator()}.
*
* @return the number of contained components
*/
@Override
public int getComponentCount() {
return components.size();
} | 3.68 |
zxing_BitMatrix_setRow | /**
* @param y row to set
* @param row {@link BitArray} to copy from
*/
public void setRow(int y, BitArray row) {
System.arraycopy(row.getBitArray(), 0, bits, y * rowSize, rowSize);
} | 3.68 |
morf_AbstractSqlDialectTest_testSelectSpecificFields | /**
* Tests a simple select with fields specified
*/
@Test
public void testSelectSpecificFields() {
SelectStatement stmt = new SelectStatement(new FieldReference(STRING_FIELD),
new FieldReference(INT_FIELD),
new FieldReference(DATE_FIELD).as("aliasDate"))
.from(new TableReference(TEST_TABLE));
String e... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.