name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
graphhopper_ShortcutUnpacker_visitOriginalEdgesFwd | /**
* Finds an edge/shortcut with the given id and adjNode and calls the visitor for each original edge that is
* packed inside this shortcut (or if an original edge is given simply calls the visitor on it).
*
* @param reverseOrder if true the original edges will be traversed in reverse order
*/
public void visitO... | 3.68 |
flink_BinaryInMemorySortBuffer_getIterator | /**
* Gets an iterator over all records in this buffer in their logical order.
*
* @return An iterator returning the records in their logical order.
*/
public MutableObjectIterator<BinaryRowData> getIterator() {
return new MutableObjectIterator<BinaryRowData>() {
private final int size = size();
... | 3.68 |
hadoop_HsJobPage_preHead | /*
* (non-Javadoc)
* @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML)
*/
@Override protected void preHead(Page.HTML<__> html) {
String jobID = $(JOB_ID);
set(TITLE, jobID.isEmpty() ? "Bad request: missing job ID"
: join("MapReduce Job ", ... | 3.68 |
framework_WebBrowser_isOpera | /**
* Tests whether the user is using Opera.
*
* @return true if the user is using Opera, false if the user is not using
* Opera or if no information on the browser is present
*/
public boolean isOpera() {
if (browserDetails == null) {
return false;
}
return browserDetails.isOpera();
} | 3.68 |
hadoop_NoopAuditManagerS3A_getUnbondedSpan | /**
* Unbonded span to use after deactivation.
*/
private AuditSpanS3A getUnbondedSpan() {
return auditor.getUnbondedSpan();
} | 3.68 |
hudi_HoodieBloomIndex_getFileInfoForLatestBaseFiles | /**
* Get BloomIndexFileInfo for all the latest base files for the requested partitions.
*
* @param partitions - List of partitions to get the base files for
* @param context - Engine context
* @param hoodieTable - Hoodie Table
* @return List of partition and file column range info pairs
*/
private List<Pai... | 3.68 |
hbase_TableDescriptorBuilder_setCoprocessor | /**
* Add a table coprocessor to this table. The coprocessor type must be
* org.apache.hadoop.hbase.coprocessor.RegionObserver or Endpoint. It won't check if the class
* can be loaded or not. Whether a coprocessor is loadable or not will be determined when a
* region is opened.
* @throws IOException any illegal pa... | 3.68 |
hadoop_PathOutputCommitter_hasOutputPath | /**
* Predicate: is there an output path?
* @return true if we have an output path set, else false.
*/
public boolean hasOutputPath() {
return getOutputPath() != null;
} | 3.68 |
zxing_BitArray_toBytes | /**
*
* @param bitOffset first bit to start writing
* @param array array to write into. Bytes are written most-significant byte first. This is the opposite
* of the internal representation, which is exposed by {@link #getBitArray()}
* @param offset position in array to start writing
* @param numBytes how many by... | 3.68 |
hudi_OptionsResolver_needsAsyncClustering | /**
* Returns whether there is need to schedule the async clustering.
*
* @param conf The flink configuration.
*/
public static boolean needsAsyncClustering(Configuration conf) {
return isInsertOperation(conf) && conf.getBoolean(FlinkOptions.CLUSTERING_ASYNC_ENABLED);
} | 3.68 |
framework_ConverterUtil_canConverterPossiblyHandle | /**
* Checks if it possible that the given converter can handle conversion
* between the given presentation and model type somehow.
*
* @param converter
* The converter to check. If this is null the result is always
* false.
* @param presentationType
* The presentation type
* @... | 3.68 |
framework_DDEventHandleStrategy_handleKeyDownEvent | /**
* Handles key down {@code event}.
*
* Default implementation doesn't do anything.
*
* @param event
* key down GWT event
* @param mediator
* VDragAndDropManager data accessor
*/
public void handleKeyDownEvent(NativePreviewEvent event,
DDManagerMediator mediator) {
// no use... | 3.68 |
hbase_ScannerContext_setSizeScope | /**
* Change the scope in which the size limit is enforced
*/
void setSizeScope(LimitScope scope) {
this.sizeScope = scope;
} | 3.68 |
flink_RateLimiterStrategy_perCheckpoint | /**
* Creates a {@code RateLimiterStrategy} that is limiting the number of records per checkpoint.
*
* @param recordsPerCheckpoint The number of records produced per checkpoint. This value has to
* be greater or equal to parallelism. The actual number of produced records is subject to
* rounding due to div... | 3.68 |
flink_RocksDBResourceContainer_relocateDefaultDbLogDir | /**
* Relocates the default log directory of RocksDB with the Flink log directory. Finds the Flink
* log directory using log.file Java property that is set during startup.
*
* @param dbOptions The RocksDB {@link DBOptions}.
*/
private void relocateDefaultDbLogDir(DBOptions dbOptions) {
String logFilePath = Sys... | 3.68 |
flink_SourceTestSuiteBase_testScaleUp | /**
* Test connector source restart from a savepoint with a higher parallelism.
*
* <p>This test will create 4 splits in the external system first, write test data to all splits
* and consume back via a Flink job with parallelism 2. Then stop the job with savepoint,
* restart the job from the checkpoint with a hig... | 3.68 |
hadoop_AuxiliaryService_setAuxiliaryLocalPathHandler | /**
* Method that sets the local dirs path handler for this Auxiliary Service.
*
* @param auxiliaryLocalPathHandler the pathHandler for this auxiliary service
*/
public void setAuxiliaryLocalPathHandler(
AuxiliaryLocalPathHandler auxiliaryLocalPathHandler) {
this.auxiliaryLocalPathHandler = auxiliaryLocalPath... | 3.68 |
flink_TableConfig_set | /**
* Sets an application-specific string-based value for the given string-based key.
*
* <p>The value will be parsed by the framework on access.
*
* <p>This method exists for convenience when configuring a session with string-based
* properties. Use {@link #set(ConfigOption, Object)} for more type-safety and inl... | 3.68 |
hadoop_ActiveAuditManagerS3A_afterTransmission | /**
* Forward to the inner span.
* {@inheritDoc}
*/
@Override
public void afterTransmission(Context.AfterTransmission context,
ExecutionAttributes executionAttributes) {
span.afterTransmission(context, executionAttributes);
} | 3.68 |
hbase_RegionStateStore_getMergeRegions | /**
* Returns Return all regioninfos listed in the 'info:merge*' columns of the given {@code region}.
*/
public List<RegionInfo> getMergeRegions(RegionInfo region) throws IOException {
return CatalogFamilyFormat.getMergeRegions(getRegionCatalogResult(region).rawCells());
} | 3.68 |
hadoop_Verifier_writeFlavorAndVerifier | /**
* Write AuthFlavor and the verifier to the XDR.
* @param verifier written to XDR
* @param xdr XDR message
*/
public static void writeFlavorAndVerifier(Verifier verifier, XDR xdr) {
if (verifier instanceof VerifierNone) {
xdr.writeInt(AuthFlavor.AUTH_NONE.getValue());
} else if (verifier instanceof Verif... | 3.68 |
hadoop_CoderUtil_cloneAsDirectByteBuffer | /**
* Clone an input bytes array as direct ByteBuffer.
*/
static ByteBuffer cloneAsDirectByteBuffer(byte[] input, int offset, int len) {
if (input == null) { // an input can be null, if erased or not to read
return null;
}
ByteBuffer directBuffer = ByteBuffer.allocateDirect(len);
directBuffer.put(input, ... | 3.68 |
hbase_HbckTableInfo_handleOverlapGroup | /**
* This takes set of overlapping regions and merges them into a single region. This covers cases
* like degenerate regions, shared start key, general overlaps, duplicate ranges, and partial
* overlapping regions. Cases: - Clean regions that overlap - Only .oldlogs regions (can't find
* start/stop range, or figur... | 3.68 |
framework_VCalendar_setEventResizeAllowed | /**
* Is resizing an event allowed.
*
* @param eventResizeAllowed
* True if allowed false if not
*/
public void setEventResizeAllowed(boolean eventResizeAllowed) {
this.eventResizeAllowed = eventResizeAllowed;
} | 3.68 |
hadoop_AuthenticationFilterInitializer_initFilter | /**
* Initializes hadoop-auth AuthenticationFilter.
* <p>
* Propagates to hadoop-auth AuthenticationFilter configuration all Hadoop
* configuration properties prefixed with "hadoop.http.authentication."
*
* @param container The filter container
* @param conf Configuration for run-time parameters
*/
@Override
pu... | 3.68 |
framework_Overlay_positionOrSizeUpdated | /**
* Recalculates proper position and dimensions for the shadow and shim
* elements. Can be used to animate the related elements, using the
* 'progress' parameter (used to animate the shadow in sync with GWT
* PopupPanel's default animation 'PopupPanel.AnimationType.CENTER').
*
* @param progress
* A ... | 3.68 |
flink_TaskManagerServices_shutDown | /** Shuts the {@link TaskExecutor} services down. */
public void shutDown() throws FlinkException {
Exception exception = null;
try {
taskManagerStateStore.shutdown();
} catch (Exception e) {
exception = e;
}
try {
ioManager.close();
} catch (Exception e) {
exc... | 3.68 |
pulsar_ResourceGroupService_resourceGroupCreate | /**
* Create RG, with non-default functions for resource-usage transport-manager.
*
* @throws if RG with that name already exists (even if the resource usage handlers are different).
*/
public void resourceGroupCreate(String rgName,
org.apache.pulsar.common.policies.data.ResourceGrou... | 3.68 |
hadoop_StagingCommitter_getFinalPath | /**
* Returns the final S3 location for a relative path as a Hadoop {@link Path}.
* This is a final method that calls {@link #getFinalKey(String, JobContext)}
* to determine the final location.
*
* @param relative the path of a file relative to the task attempt path
* @param context the JobContext or TaskAttemptC... | 3.68 |
hudi_TableSchemaResolver_getTableParquetSchema | /**
* Gets users data schema for a hoodie table in Parquet format.
*
* @return Parquet schema for the table
*/
public MessageType getTableParquetSchema(boolean includeMetadataField) throws Exception {
return convertAvroSchemaToParquet(getTableAvroSchema(includeMetadataField));
} | 3.68 |
framework_AbstractListing_doWriteDesign | /**
* Writes listing specific state into the given design.
* <p>
* This method is separated from
* {@link #writeDesign(Element, DesignContext)} to be overridable in
* subclasses that need to replace this, but still must be able to call
* {@code super.writeDesign(...)}.
*
* @see #doReadDesign(Element, DesignCont... | 3.68 |
hbase_QuotaTableUtil_makeGetForSnapshotSize | /**
* Creates a {@link Get} for the HBase snapshot's size against the given table.
*/
static Get makeGetForSnapshotSize(TableName tn, String snapshot) {
Get g = new Get(Bytes.add(QUOTA_TABLE_ROW_KEY_PREFIX, Bytes.toBytes(tn.toString())));
g.addColumn(QUOTA_FAMILY_USAGE,
Bytes.add(QUOTA_SNAPSHOT_SIZE_QUALIFIER... | 3.68 |
framework_GridMultiSelect_getSelectAllCheckBoxVisibility | /**
* Gets the current mode for the select all checkbox visibility.
*
* @return the select all checkbox visibility mode
* @see SelectAllCheckBoxVisibility
* @see #isSelectAllCheckBoxVisible()
*/
public SelectAllCheckBoxVisibility getSelectAllCheckBoxVisibility() {
return model.getSelectAllCheckBoxVisibility()... | 3.68 |
zxing_ResultPoint_crossProductZ | /**
* Returns the z component of the cross product between vectors BC and BA.
*/
private static float crossProductZ(ResultPoint pointA,
ResultPoint pointB,
ResultPoint pointC) {
float bX = pointB.x;
float bY = pointB.y;
return ((pointC.x - bX... | 3.68 |
hbase_Bytes_contains | /**
* Return true if target is present as an element anywhere in the given array.
* @param array an array of {@code byte} values, possibly empty
* @param target an array of {@code byte}
* @return {@code true} if {@code target} is present anywhere in {@code array}
*/
public static boolean contains(byte[] array, by... | 3.68 |
flink_KeyedStream_timeWindow | /**
* Windows this {@code KeyedStream} into sliding time windows.
*
* <p>This is a shortcut for either {@code .window(SlidingEventTimeWindows.of(size, slide))} or
* {@code .window(SlidingProcessingTimeWindows.of(size, slide))} depending on the time
* characteristic set using {@link
* org.apache.flink.streaming.ap... | 3.68 |
pulsar_DnsResolverUtil_applyJdkDnsCacheSettings | /**
* Configure Netty's {@link DnsNameResolverBuilder}'s ttl and negativeTtl to match the JDK's DNS caching settings.
* If the JDK setting for TTL is forever (-1), the TTL will be set to 60 seconds.
*
* @param dnsNameResolverBuilder The Netty {@link DnsNameResolverBuilder} instance to apply the settings
*/
public ... | 3.68 |
hadoop_SCMStore_cleanResourceReferences | /**
* Clean all resource references to a cache resource that contain application
* ids pointing to finished applications. If the resource key does not exist,
* do nothing.
*
* @param key a unique identifier for a resource
* @throws YarnException
*/
@Private
public void cleanResourceReferences(String key) throws ... | 3.68 |
hadoop_S3ClientFactory_getRegion | /**
* Get the region.
* @return invoker
*/
public String getRegion() {
return region;
} | 3.68 |
hbase_ScannerModel_setColumns | /**
* @param columns list of columns of interest in column:qualifier format, or empty for all
*/
public void setColumns(List<byte[]> columns) {
this.columns = columns;
} | 3.68 |
hadoop_HttpExceptionUtils_createServletExceptionResponse | /**
* Creates a HTTP servlet response serializing the exception in it as JSON.
*
* @param response the servlet response
* @param status the error code to set in the response
* @param ex the exception to serialize in the response
* @throws IOException thrown if there was an error while creating the
* response
*/... | 3.68 |
hbase_TableDescriptorBuilder_setDurability | /**
* Sets the {@link Durability} setting for the table. This defaults to Durability.USE_DEFAULT.
* @param durability enum value
* @return the modifyable TD
*/
public ModifyableTableDescriptor setDurability(Durability durability) {
return setValue(DURABILITY_KEY, durability.name());
} | 3.68 |
hbase_BackupRestoreFactory_getBackupMergeJob | /**
* Gets backup merge job
* @param conf configuration
* @return backup merge job instance
*/
public static BackupMergeJob getBackupMergeJob(Configuration conf) {
Class<? extends BackupMergeJob> cls = conf.getClass(HBASE_BACKUP_MERGE_IMPL_CLASS,
MapReduceBackupMergeJob.class, BackupMergeJob.class);
BackupM... | 3.68 |
MagicPlugin_Wand_checkHotbarCount | // This catches the hotbar_count having changed since the last time the inventory was built
// in which case we want to add a new hotbar inventory without re-arranging the main inventories
// newly added hotbars will be empty, spells in removed hotbars will be added to the end of the inventories.
protected void checkHo... | 3.68 |
hbase_JVMClusterUtil_startup | /**
* Start the cluster. Waits until there is a primary master initialized and returns its address.
* @return Address to use contacting primary master.
*/
public static String startup(final List<JVMClusterUtil.MasterThread> masters,
final List<JVMClusterUtil.RegionServerThread> regionservers) throws IOException {
... | 3.68 |
hadoop_AbstractManifestData_unmarshallPath | /**
* Convert a string path to Path type, by way of a URI.
* @param path path as a string
* @return path value
* @throws RuntimeException marshalling failure.
*/
public static Path unmarshallPath(String path) {
try {
return new Path(new URI(requireNonNull(path, "No path")));
} catch (URISyntaxException e) ... | 3.68 |
morf_HumanReadableStatementHelper_generateFromAndWhereClause | /**
* Generates the from and where clause for a select statement. If there is no selection
* expression then the 'where' fragment will be omitted.
*
* @param statement the statement to describe.
* @param prefix whether to include the " from " prefix in the clause
* @return a string containing the human-readable d... | 3.68 |
flink_Either_isRight | /** @return true if this is a Right value, false if this is a Left value */
public final boolean isRight() {
return getClass() == Right.class;
} | 3.68 |
pulsar_Authentication_newRequestHeader | /**
* Add an authenticationStage that will complete along with authFuture.
*/
default Set<Entry<String, String>> newRequestHeader(String hostName,
AuthenticationDataProvider authData,
Map<String, String> previousRe... | 3.68 |
hbase_HMaster_move | // Public so can be accessed by tests. Blocks until move is done.
// Replace with an async implementation from which you can get
// a success/failure result.
@InterfaceAudience.Private
public void move(final byte[] encodedRegionName, byte[] destServerName) throws IOException {
RegionState regionState =
assignment... | 3.68 |
framework_VAccordion_setContent | /**
* Updates the content of the open tab of the accordion.
*
* This method is mostly for internal use and may change in future
* versions.
*
* @since 7.2
* @param newWidget
* new content
*/
public void setContent(Widget newWidget) {
if (widget == null) {
widget = newWidget;
widg... | 3.68 |
Activiti_ObjectValueExpression_isLiteralText | /**
* Answer <code>false</code>.
*/
@Override
public boolean isLiteralText() {
return false;
} | 3.68 |
hadoop_S3ListResult_v1 | /**
* Restricted constructors to ensure v1 or v2, not both.
* @param result v1 result
* @return new list result container
*/
public static S3ListResult v1(ListObjectsResponse result) {
return new S3ListResult(requireNonNull(result), null);
} | 3.68 |
hbase_MasterRpcServices_switchBalancer | /**
* Assigns balancer switch according to BalanceSwitchMode
* @param b new balancer switch
* @param mode BalanceSwitchMode
* @return old balancer switch
*/
boolean switchBalancer(final boolean b, BalanceSwitchMode mode) throws IOException {
boolean oldValue = server.loadBalancerStateStore.get();
boolean ne... | 3.68 |
hadoop_TypedBytesInput_readRawList | /**
* Reads the raw bytes following a <code>Type.LIST</code> code.
* @return the obtained bytes sequence
* @throws IOException
*/
public byte[] readRawList() throws IOException {
Buffer buffer = new Buffer(new byte[] { (byte) Type.LIST.code });
byte[] bytes = readRaw();
while (bytes != null) {
buffer.appe... | 3.68 |
hbase_BucketCache_retrieveFromFile | /**
* @see #persistToFile()
*/
private void retrieveFromFile(int[] bucketSizes) throws IOException {
LOG.info("Started retrieving bucket cache from file");
File persistenceFile = new File(persistencePath);
if (!persistenceFile.exists()) {
LOG.warn("Persistence file missing! "
+ "It's ok if it's first ... | 3.68 |
framework_VTooltip_setQuickOpenDelay | /**
* Sets the time (in ms) that should elapse before a tooltip will be shown,
* in the situation when a tooltip has very recently been shown (within
* {@link #getQuickOpenDelay()} ms).
*
* @param quickOpenDelay
* The quick open delay (in ms)
*/
public void setQuickOpenDelay(int quickOpenDelay) {
... | 3.68 |
flink_ExecutionConfig_getDefaultKryoSerializerClasses | /** Returns the registered default Kryo Serializer classes. */
public LinkedHashMap<Class<?>, Class<? extends Serializer<?>>>
getDefaultKryoSerializerClasses() {
return defaultKryoSerializerClasses;
} | 3.68 |
zxing_DecoderResult_setNumBits | /**
* @param numBits overrides the number of bits that are valid in {@link #getRawBytes()}
* @since 3.3.0
*/
public void setNumBits(int numBits) {
this.numBits = numBits;
} | 3.68 |
streampipes_ElasticsearchSinkBase_disableFlushOnCheckpoint | /**
* Disable flushing on checkpoint. When disabled, the sink will not wait for all
* pending action requests to be acknowledged by Elasticsearch on checkpoints.
*
* <p>NOTE: If flushing on checkpoint is disabled, the Flink Elasticsearch Sink does NOT
* provide any strong guarantees for at-least-once delivery of a... | 3.68 |
hbase_Region_checkAndRowMutate | /**
* Atomically checks if a row matches the filter and if it does, it performs the row mutations.
* Use to do many mutations on a single row. Use checkAndMutate to do one checkAndMutate at a
* time.
* @param row to check
* @param filter the filter
* @param mutations data to put if check succeeds
* @ret... | 3.68 |
hbase_HBaseTestingUtility_predicateTableDisabled | /**
* Returns a {@link Predicate} for checking that table is enabled
*/
public Waiter.Predicate<IOException> predicateTableDisabled(final TableName tableName) {
return new ExplainingPredicate<IOException>() {
@Override
public String explainFailure() throws IOException {
return explainTableState(tableN... | 3.68 |
hbase_Bytes_toBigDecimal | /** Converts a byte array to a BigDecimal value */
public static BigDecimal toBigDecimal(byte[] bytes, int offset, final int length) {
if (bytes == null || length < SIZEOF_INT + 1 || (offset + length > bytes.length)) {
return null;
}
int scale = toInt(bytes, offset);
byte[] tcBytes = new byte[length - SIZE... | 3.68 |
hudi_JmxReporterServer_forRegistry | /**
* Returns a new {@link JmxReporterServer.Builder} for {@link JmxReporterServer}.
*
* @param registry the registry to report
* @return a {@link JmxReporterServer.Builder} instance for a {@link JmxReporterServer}
*/
public static JmxReporterServer.Builder forRegistry(MetricRegistry registry) {
return new JmxRe... | 3.68 |
framework_TabSheet_readDesign | /*
* (non-Javadoc)
*
* @see com.vaadin.ui.AbstractComponent#readDesign(org.jsoup.nodes .Element,
* com.vaadin.ui.declarative.DesignContext)
*/
@Override
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
// create new tabs
for (Element tab : d... | 3.68 |
hadoop_WordMean_getMean | /**
* Only valuable after run() called.
*
* @return Returns the mean value.
*/
public double getMean() {
return mean;
} | 3.68 |
pulsar_JavaInstanceRunnable_run | /**
* The core logic that initialize the instance thread and executes the function.
*/
@Override
public void run() {
try {
setup();
Thread currentThread = Thread.currentThread();
Consumer<Throwable> asyncErrorHandler = throwable -> currentThread.interrupt();
AsyncResultConsumer as... | 3.68 |
hadoop_ServiceRecord_clone | /**
* Shallow clone: all endpoints will be shared across instances
* @return a clone of the instance
* @throws CloneNotSupportedException
*/
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
} | 3.68 |
hbase_HBaseTestingUtility_flush | /**
* Flushes all caches in the mini hbase cluster
*/
public void flush(TableName tableName) throws IOException {
getMiniHBaseCluster().flushcache(tableName);
} | 3.68 |
hadoop_OBSPosixBucketUtils_fsIsFolder | /**
* Used to judge that an object is a file or folder.
*
* @param attr posix object attribute
* @return is posix folder
*/
static boolean fsIsFolder(final ObsFSAttribute attr) {
final int ifDir = 0x004000;
int mode = attr.getMode();
// object mode is -1 when the object is migrated from
// object bucket to... | 3.68 |
framework_SortOrderBuilder_thenAsc | /**
* Appends sorting with ascending sort direction.
*
* @param by
* the object to sort by
* @return this sort builder
*/
public SortOrderBuilder<T, V> thenAsc(V by) {
return append(createSortOrder(by, SortDirection.ASCENDING));
} | 3.68 |
hadoop_RequestFactoryImpl_getCannedACL | /**
* Get the canned ACL of this FS.
* @return an ACL, if any
*/
@Override
public String getCannedACL() {
return cannedACL;
} | 3.68 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_constructExtraMetadata | /**
* Construct extra metadata for clustering group
*/
private Map<String, String> constructExtraMetadata(String partition, List<ConsistentHashingNode> nodes, int seqNo) {
Map<String, String> extraMetadata = new HashMap<>();
try {
extraMetadata.put(METADATA_PARTITION_KEY, partition);
extraMetadata.put(MET... | 3.68 |
dubbo_AbstractZookeeperTransporter_writeToClientMap | /**
* write address-ZookeeperClient relationship to Map
*
* @param addressList
* @param zookeeperClient
*/
void writeToClientMap(List<String> addressList, ZookeeperClient zookeeperClient) {
for (String address : addressList) {
zookeeperClientMap.put(address, zookeeperClient);
}
} | 3.68 |
hbase_Table_append | /**
* Appends values to one or more columns within a single row.
* <p>
* This operation guaranteed atomicity to readers. Appends are done under a single row lock, so
* write operations to a row are synchronized, and readers are guaranteed to see this operation
* fully completed.
* @param append object that specif... | 3.68 |
querydsl_SQLExpressions_regrSxy | /**
* REGR_SXY makes the following computation after the elimination of null (arg1, arg2) pairs:
*
* <p>REGR_COUNT(arg1, arg2) * COVAR_POP(arg1, arg2)</p>
*
* @param arg1 first arg
* @param arg2 second arg
* @return regr_sxy(arg1, arg2)
*/
public static WindowOver<Double> regrSxy(Expression<? extends Number> ar... | 3.68 |
framework_CustomizedSystemMessages_setCommunicationErrorMessage | /**
* Sets the message of the notification. Set to null for no message. If both
* caption and message is null, the notification is disabled;
*
* @param communicationErrorMessage
* the message
*/
public void setCommunicationErrorMessage(String communicationErrorMessage) {
this.communicationErrorMess... | 3.68 |
hmily_IndexMetaDataLoader_load | /**
* Load index meta data list.
* In a few jdbc implementation(eg. oracle), return value of getIndexInfo contains a statistics record that not a index itself and INDEX_NAME is null.
*
* @param connection connection
* @param table table name
* @return index meta data list
* @throws SQLException SQL exception
*... | 3.68 |
framework_VScrollTable_setExpandRatio | /**
* Sets the expand ratio of the cell.
*
* @param floatAttribute
* The expand ratio
*/
public void setExpandRatio(float floatAttribute) {
expandRatio = floatAttribute;
} | 3.68 |
hadoop_RLESparseResourceAllocation_addInterval | /**
* Add a resource for the specified interval.
*
* @param reservationInterval the interval for which the resource is to be
* added
* @param totCap the resource to be added
* @return true if addition is successful, false otherwise
*/
public boolean addInterval(ReservationInterval reservationInterval,
... | 3.68 |
hadoop_TypedBytesInput_readRawByte | /**
* Reads the raw byte following a <code>Type.BYTE</code> code.
* @return the obtained byte
* @throws IOException
*/
public byte[] readRawByte() throws IOException {
byte[] bytes = new byte[2];
bytes[0] = (byte) Type.BYTE.code;
in.readFully(bytes, 1, 1);
return bytes;
} | 3.68 |
framework_VaadinPortletSession_firePortletEventRequest | /**
* For internal use by the framework only - API subject to change.
*/
public void firePortletEventRequest(UI uI, EventRequest request,
EventResponse response) {
for (PortletListener l : new ArrayList<>(portletListeners)) {
l.handleEventRequest(request, response, uI);
}
} | 3.68 |
hadoop_SubClusterState_fromString | /**
* Convert a string into {@code SubClusterState}.
*
* @param state the string to convert in SubClusterState
* @return the respective {@code SubClusterState}
*/
public static SubClusterState fromString(String state) {
try {
return SubClusterState.valueOf(state);
} catch (Exception e) {
LOG.error("Inv... | 3.68 |
hudi_SpillableMapUtils_getPreCombineVal | /**
* Returns the preCombine value with given field name.
*
* @param rec The avro record
* @param preCombineField The preCombine field name
* @return the preCombine field value or 0 if the field does not exist in the avro schema
*/
private static Object getPreCombineVal(GenericRecord rec, String preCombineField) ... | 3.68 |
hbase_RegionCoprocessorHost_postExists | /**
* @param get the Get request
* @param result the result returned by the region server
* @return the result to return to the client
* @exception IOException Exception
*/
public boolean postExists(final Get get, boolean result) throws IOException {
if (this.coprocEnvironments.isEmpty()) {
return result;... | 3.68 |
flink_HiveFunctionWrapper_deserializeUDF | /**
* Deserialize UDF used the udfSerializedString held on.
*
* @return the UDF deserialized
*/
@SuppressWarnings("unchecked")
private UDFType deserializeUDF() {
return (UDFType)
deserializeObjectFromKryo(udfSerializedBytes, (Class<Serializable>) getUDFClass());
} | 3.68 |
dubbo_ServiceBean_exported | /**
* @since 2.6.5
*/
@Override
protected void exported() {
super.exported();
// Publish ServiceBeanExportedEvent
publishExportEvent();
} | 3.68 |
dubbo_Environment_getConfiguration | /**
* There are two ways to get configuration during exposure / reference or at runtime:
* 1. URL, The value in the URL is relatively fixed. we can get value directly.
* 2. The configuration exposed in this method is convenient for us to query the latest values from multiple
* prioritized sources, it also guarantee... | 3.68 |
hudi_AvroOrcUtils_addUnionValue | /**
* Match value with its ORC type and add to the union vector at a given position.
*
* @param unionVector The vector to store value.
* @param unionChildTypes All possible types for the value Object.
* @param avroSchema Avro union schema for the value Object.
* @param value Object to b... | 3.68 |
nifi-maven_NarProvidedDependenciesMojo_isTest | /**
* Returns whether the specified dependency has test scope.
*
* @param node The dependency
* @return What the dependency is a test scoped dep
*/
private boolean isTest(final DependencyNode node) {
return "test".equals(node.getArtifact().getScope());
} | 3.68 |
hbase_StripeStoreFileManager_processResults | /**
* Process new files, and add them either to the structure of existing stripes, or to the list
* of new candidate stripes.
* @return New candidate stripes.
*/
private TreeMap<byte[], HStoreFile> processResults() {
TreeMap<byte[], HStoreFile> newStripes = null;
for (HStoreFile sf : this.results) {
byte[] ... | 3.68 |
flink_CreditBasedSequenceNumberingViewReader_getNextDataType | /**
* Returns the {@link org.apache.flink.runtime.io.network.buffer.Buffer.DataType} of the next
* buffer in line.
*
* <p>Returns the next data type only if the next buffer is an event or the reader has both
* available credits and buffers.
*
* @implSpec BEWARE: this must be in sync with {@link #getAvailabilityA... | 3.68 |
flink_CopyOnWriteSkipListStateMap_getValueForSnapshot | /**
* Returns the value pointer used by the snapshot of the given version.
*
* @param snapshotVersion version of snapshot.
* @return the value pointer of the version used by the given snapshot. NIL_VALUE_POINTER will
* be returned if there is no value for this snapshot.
*/
long getValueForSnapshot(long node, ... | 3.68 |
hbase_TableRecordReader_nextKeyValue | /**
* Positions the record reader to the next record.
* @return <code>true</code> if there was another record.
* @throws IOException When reading the record failed.
* @throws InterruptedException When the job was aborted.
* @see org.apache.hadoop.mapreduce.RecordReader#nextKeyValue()
*/
@Override
public ... | 3.68 |
flink_TtlIncrementalCleanup_setTtlState | /**
* As TTL state wrapper depends on this class through access callback, it has to be set here
* after its construction is done.
*/
public void setTtlState(@Nonnull AbstractTtlState<K, N, ?, S, ?> ttlState) {
this.ttlState = ttlState;
} | 3.68 |
hadoop_BlockBlobAppendStream_close | /**
* Force all data in the output stream to be written to Azure storage.
* Wait to return until this is complete. Close the access to the stream and
* shutdown the upload thread pool.
* If the blob was created, its lease will be released.
* Any error encountered caught in threads and stored will be rethrown here
... | 3.68 |
flink_Tuple23_copy | /**
* Shallow tuple copy.
*
* @return A new Tuple with the same fields as this.
*/
@Override
@SuppressWarnings("unchecked")
public Tuple23<
T0,
T1,
T2,
T3,
T4,
T5,
T6,
T7,
... | 3.68 |
flink_EdgeManagerBuildUtil_computeMaxEdgesToTargetExecutionVertex | /**
* Given parallelisms of two job vertices, compute the max number of edges connected to a target
* execution vertex from the source execution vertices. Note that edge is considered undirected
* here. It can be an edge connected from an upstream job vertex to a downstream job vertex, or
* in a reversed way.
*
*... | 3.68 |
flink_TaskLocalStateStoreImpl_deleteDirectory | /** Helper method to delete a directory. */
protected void deleteDirectory(File directory) throws IOException {
Path path = new Path(directory.toURI());
FileSystem fileSystem = path.getFileSystem();
if (fileSystem.exists(path)) {
fileSystem.delete(path, true);
}
} | 3.68 |
flink_TaskExecutor_onFatalError | /**
* Notifies the TaskExecutor that a fatal error has occurred and it cannot proceed.
*
* @param t The exception describing the fatal error
*/
void onFatalError(final Throwable t) {
try {
log.error("Fatal error occurred in TaskExecutor {}.", getAddress(), t);
} catch (Throwable ignored) {
}
... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.