name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
flink_PythonCsvUtils_createRowDataToCsvFormatConverterContext | /**
* Util for creating a {@link
* RowDataToCsvConverters.RowDataToCsvConverter.RowDataToCsvFormatConverterContext}.
*/
public static RowDataToCsvConverters.RowDataToCsvConverter.RowDataToCsvFormatConverterContext
createRowDataToCsvFormatConverterContext(CsvMapper mapper, ContainerNode<?> container) {
re... | 3.68 |
pulsar_ManagedLedgerConfig_getBookKeeperEnsemblePlacementPolicyProperties | /**
* Returns properties required by configured bookKeeperEnsemblePlacementPolicy.
*
* @return
*/
public Map<String, Object> getBookKeeperEnsemblePlacementPolicyProperties() {
return bookKeeperEnsemblePlacementPolicyProperties;
} | 3.68 |
hibernate-validator_ConstrainedExecutable_isEquallyParameterConstrained | /**
* Whether this and the given other executable have the same parameter
* constraints.
*
* @param other The other executable to check.
*
* @return True if this and the other executable have the same parameter
* constraints (including cross- parameter constraints and parameter
* cascades), fals... | 3.68 |
graphhopper_Instruction_getPoints | /* This method returns the points associated to this instruction. Please note that it will not include the last point,
* i.e. the first point of the next instruction object.
*/
public PointList getPoints() {
return points;
} | 3.68 |
flink_FlinkContainers_getJobManagerPort | /** Gets JobManager's port on the host machine. */
public int getJobManagerPort() {
return jobManager.getMappedPort(this.conf.get(RestOptions.PORT));
} | 3.68 |
hbase_TagUtil_carryForwardTTLTag | /** Returns Carry forward the TTL tag. */
public static List<Tag> carryForwardTTLTag(final List<Tag> tagsOrNull, final long ttl) {
if (ttl == Long.MAX_VALUE) {
return tagsOrNull;
}
List<Tag> tags = tagsOrNull;
// If we are making the array in here, given we are the last thing checked, we'll be only thing
... | 3.68 |
pulsar_NonPersistentTopic_deleteForcefully | /**
* Forcefully close all producers/consumers/replicators and deletes the topic.
*
* @return
*/
@Override
public CompletableFuture<Void> deleteForcefully() {
return delete(false, true);
} | 3.68 |
framework_ListDataSource_getSelectAllHandler | /**
* Returns a {@link SelectAllHandler} for this ListDataSource.
*
* @return select all handler
*/
public SelectAllHandler<T> getSelectAllHandler() {
return new SelectAllHandler<T>() {
@Override
public void onSelectAll(SelectAllEvent<T> event) {
event.getSelectionModel().select(asLi... | 3.68 |
pulsar_ProducerConfiguration_getBatchingEnabled | /**
* Return the flag whether automatic message batching is enabled or not.
*
* @return true if batch messages are enabled. otherwise false.
* @since 2.0.0 <br>
* It is enabled by default.
*/
public boolean getBatchingEnabled() {
return conf.isBatchingEnabled();
} | 3.68 |
hudi_ImmutablePair_setValue | /**
* <p>
* Throws {@code UnsupportedOperationException}.
* </p>
*
* <p>
* This pair is immutable, so this operation is not supported.
* </p>
*
* @param value the value to set
* @return never
* @throws UnsupportedOperationException as this operation is not supported
*/
@Override
public R setValue(final R va... | 3.68 |
framework_DesignFormatter_removeConverter | /**
* Removes the converter for given type, if it was present.
*
* @param type
* Type to remove converter for.
*/
protected void removeConverter(Class<?> type) {
converterMap.remove(type);
} | 3.68 |
hbase_Mutation_getCellVisibility | /** Returns CellVisibility associated with cells in this Mutation. n */
public CellVisibility getCellVisibility() throws DeserializationException {
byte[] cellVisibilityBytes = this.getAttribute(VisibilityConstants.VISIBILITY_LABELS_ATTR_KEY);
if (cellVisibilityBytes == null) return null;
return toCellVisibility(... | 3.68 |
flink_SerializedCheckpointData_getCheckpointId | /**
* Gets the checkpointId of the checkpoint.
*
* @return The checkpointId of the checkpoint.
*/
public long getCheckpointId() {
return checkpointId;
} | 3.68 |
pulsar_LedgerOffloaderFactory_create | /**
* Create a ledger offloader with the provided configuration, user-metadata, schema storage,
* scheduler and offloaderStats.
*
* @param offloadPolicies offload policies
* @param userMetadata user metadata
* @param schemaStorage used for schema lookup in offloader
* @param scheduler scheduler
* @param offload... | 3.68 |
hudi_TableHeader_getNumFields | /**
* Get number of fields in the table.
*/
public int getNumFields() {
return fieldNames.size();
} | 3.68 |
hudi_PartitionFilterGenerator_buildMinMaxPartitionExpression | /**
* This method will extract the min value and the max value of each field,
* and construct GreatThanOrEqual and LessThanOrEqual to build the expression.
*
* This method can reduce the Expression tree level a lot if each field has too many values.
*/
private static Expression buildMinMaxPartitionExpression(List<... | 3.68 |
hadoop_BufferData_getState | /**
* Gets the state of this block.
*
* @return the state of this block.
*/
public State getState() {
return this.state;
} | 3.68 |
hadoop_SinglePendingCommit_load | /**
* Load an instance from a file, then validate it.
* @param fs filesystem
* @param path path
* @param serDeser deserializer
* @param status status of file to load or null
* @return the loaded instance
* @throws IOException IO failure
* @throws ValidationFailure if the data is invalid
*/
public static Single... | 3.68 |
hbase_MasterObserver_postDisableReplicationPeer | /**
* Called after disable a replication peer
* @param peerId a short name that identifies the peer
*/
default void postDisableReplicationPeer(final ObserverContext<MasterCoprocessorEnvironment> ctx,
String peerId) throws IOException {
} | 3.68 |
hadoop_AccessTokenTimer_convertExpiresIn | /**
* The expires_in param from OAuth is in seconds-from-now. Convert to
* milliseconds-from-epoch
*/
static Long convertExpiresIn(Timer timer, String expiresInSecs) {
long expiresSecs = Long.parseLong(expiresInSecs);
long expiresMs = expiresSecs * 1000;
return timer.now() + expiresMs;
} | 3.68 |
rocketmq-connect_LocalConfigManagementServiceImpl_triggerSendMessage | /**
* send all connector config
*/
private void triggerSendMessage() {
ConnAndTaskConfigs configs = new ConnAndTaskConfigs();
configs.setConnectorConfigs(connectorKeyValueStore.getKVMap());
connectorKeyValueStore.getKVMap().forEach((connectName, connectKeyValue) -> {
Struct struct = new Struct(CON... | 3.68 |
flink_SpillingThread_getSegmentsForReaders | /**
* Divides the given collection of memory buffers among {@code numChannels} sublists.
*
* @param target The list into which the lists with buffers for the channels are put.
* @param memory A list containing the memory buffers to be distributed. The buffers are not
* removed from this list.
* @param numChan... | 3.68 |
hadoop_WriteOperationHelper_uploadPart | /**
* Upload part of a multi-partition file.
* @param request request
* @param durationTrackerFactory duration tracker factory for operation
* @param request the upload part request.
* @param body the request body.
* @return the result of the operation.
* @throws IOException on problems
*/
@Retries.RetryTransla... | 3.68 |
framework_SingleSelectionEvent_getSource | /**
* The single select on which the Event initially occurred.
*
* @return The single select on which the Event initially occurred.
*/
@Override
public SingleSelect<T> getSource() {
return (SingleSelect<T>) super.getSource();
} | 3.68 |
hadoop_StateStoreUtils_getRecordClass | /**
* Get the base class for a record. If we get an implementation of a record we
* will return the real parent record class.
*
* @param <T> Type of the class of the data record.
* @param record Record to check its main class.
* @return Base class for the record.
*/
public static <T extends BaseRecord>
Class... | 3.68 |
hbase_BucketCache_checkIOErrorIsTolerated | /**
* Check whether we tolerate IO error this time. If the duration of IOEngine throwing errors
* exceeds ioErrorsDurationTimeTolerated, we will disable the cache
*/
private void checkIOErrorIsTolerated() {
long now = EnvironmentEdgeManager.currentTime();
// Do a single read to a local variable to avoid timing i... | 3.68 |
hadoop_LoggingStateChangeListener_stateChanged | /**
* Callback for a state change event: log it
* @param service the service that has changed.
*/
@Override
public void stateChanged(Service service) {
log.info("Entry to state " + service.getServiceState()
+ " for " + service.getName());
} | 3.68 |
framework_SortOrder_getColumn | /**
* Returns the {@link GridColumn} reference given in the constructor.
*
* @return a grid column reference
*/
public Grid.Column<?, ?> getColumn() {
return column;
} | 3.68 |
morf_ViewChangesDeploymentHelper_createView | /**
* Creates SQL statements for creating given view.
*
* @param view View to be created.
* @param updateDeployedViews Whether to update the DeployedViews table.
* @return SQL statements to be run to create the view.
* @deprecated kept to ensure backwards compatibility.
*/
@Deprecated
List<String> createView(Vie... | 3.68 |
hibernate-validator_ClassCheckFactory_getClassChecks | /**
* Provides a collections of checks to be performed on a given element.
*
* @param element an element you'd like to check
*
* @return The checks to be performed to validate the given
*/
public Collection<ClassCheck> getClassChecks(Element element) {
switch ( element.getKind() ) {
case METHOD:
return meth... | 3.68 |
framework_StateChangeEvent_addAllStateFields | /**
* Recursively adds the names of all properties in the provided state type.
*
* @param type
* the type to process
* @param changedProperties
* a set of all currently added properties
* @param context
* the base name of the current object
*/
@Deprecated
private static void ad... | 3.68 |
morf_SchemaUtils_column | /**
* Build a {@link Column}.
* <p>
* This method returns a {@link ColumnBuilder} whose properties are an exact copy of the passed in {@link Column}.
* </p>
* <p>
* Use the methods on {@link ColumnBuilder} to provide optional properties.
* </p>
*
* @param column The column to copy.
* @return A new {@link Colu... | 3.68 |
hbase_HRegion_replayWALFlushMarker | /**
* @deprecated Since 3.0.0, will be removed in 4.0.0. Only for keep compatibility for old region
* replica implementation.
*/
@Deprecated
void replayWALFlushMarker(FlushDescriptor flush, long replaySeqId) throws IOException {
checkTargetRegion(flush.getEncodedRegionName().toByteArray(), "Flush marke... | 3.68 |
querydsl_DateTimeExpression_hour | /**
* Create a hours expression (range 0-23)
*
* @return hour
*/
public NumberExpression<Integer> hour() {
if (hours == null) {
hours = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.HOUR, mixin);
}
return hours;
} | 3.68 |
pulsar_NamespaceIsolationPolicies_deletePolicy | /**
* Delete a policy.
*
* @param policyName
*/
public void deletePolicy(String policyName) {
policies.remove(policyName);
} | 3.68 |
framework_PureGWTTestApplication_getChildMenu | /**
* Gets a reference to a child menu with a certain title, that is a
* direct child of this menu level.
*
* @param title
* a title string
* @return a Menu object with the specified title string, or null, if
* this menu doesn't have a direct child with the specified
* title.
*/
publ... | 3.68 |
graphhopper_TurnCost_create | /**
* This creates an EncodedValue specifically for the turn costs
*/
public static DecimalEncodedValue create(String name, int maxTurnCosts) {
int turnBits = BitUtil.countBitValue(maxTurnCosts);
return new DecimalEncodedValueImpl(key(name), turnBits, 0, 1, false, false, true);
} | 3.68 |
framework_MultiSelectionModelConnector_onSelectAllEvent | /**
* Handler for selecting / deselecting all grid rows.
*
* @param event
* the select all event from grid
*/
protected void onSelectAllEvent(SelectAllEvent<JsonObject> event) {
final boolean allSelected = event.isAllSelected();
final boolean wasAllSelected = isAllSelected();
assert allSelec... | 3.68 |
framework_Profiler_getMaxTimeSpent | /**
* Gets the maximum time spent for one invocation of this node,
* including time spent in sub nodes.
*
* @return the time spent for the slowest invocation, in milliseconds
*/
public double getMaxTimeSpent() {
return maxTime;
} | 3.68 |
hadoop_StartupProgress_createView | /**
* Creates a {@link StartupProgressView} containing data cloned from this
* StartupProgress. Subsequent updates to this StartupProgress will not be
* shown in the view. This gives a consistent, unchanging view for callers
* that need to perform multiple related read operations. Calculations that
* require ag... | 3.68 |
hadoop_OBSInputStream_onReadFailure | /**
* Handle an IOE on a read by attempting to re-open the stream. The
* filesystem's readException count will be incremented.
*
* @param ioe exception caught.
* @param length length of data being attempted to read
* @throws IOException any exception thrown on the re-open attempt.
*/
private void onReadFailur... | 3.68 |
hbase_MiniHBaseCluster_getRegionServerThreads | /**
* @return List of region server threads. Does not return the master even though it is also a
* region server.
*/
public List<JVMClusterUtil.RegionServerThread> getRegionServerThreads() {
return this.hbaseCluster.getRegionServers();
} | 3.68 |
hbase_ByteBufferUtils_toBigDecimal | /**
* Reads a BigDecimal value at the given buffer's offset.
* @param buffer input bytebuffer to read
* @param offset input offset
* @return BigDecimal value at offset
*/
public static BigDecimal toBigDecimal(ByteBuffer buffer, int offset, int length) {
if (buffer == null || length < Bytes.SIZEOF_INT + 1 || (off... | 3.68 |
flink_TypeInference_newBuilder | /** Builder for configuring and creating instances of {@link TypeInference}. */
public static TypeInference.Builder newBuilder() {
return new TypeInference.Builder();
} | 3.68 |
morf_SqlDialect_getSqlForGreatest | /**
* Converts the greatest function into SQL.
*
* @param function the function details
* @return a string representation of the SQL
*/
protected String getSqlForGreatest(Function function) {
return getGreatestFunctionName() + '(' + Joiner.on(", ").join(function.getArguments().stream().map(f -> getSqlFrom(f)).it... | 3.68 |
flink_MetricGroup_meter | /**
* Registers a new {@link Meter} with Flink.
*
* @param name name of the meter
* @param meter meter to register
* @param <M> meter type
* @return the registered meter
*/
default <M extends Meter> M meter(int name, M meter) {
return meter(String.valueOf(name), meter);
} | 3.68 |
hbase_HMaster_createAssignmentManager | // Will be overriden in test to inject customized AssignmentManager
@InterfaceAudience.Private
protected AssignmentManager createAssignmentManager(MasterServices master,
MasterRegion masterRegion) {
return new AssignmentManager(master, masterRegion);
} | 3.68 |
framework_Panel_setScrollLeft | /*
* (non-Javadoc)
*
* @see com.vaadin.server.Scrollable#setScrollLeft(int)
*/
@Override
public void setScrollLeft(int scrollLeft) {
if (scrollLeft < 0) {
throw new IllegalArgumentException(
"Scroll offset must be at least 0");
}
getState().scrollLeft = scrollLeft;
} | 3.68 |
graphhopper_AbstractTiffElevationProvider_downloadToFile | /**
* Download a file at the provided url and save it as the given downloadFile if the downloadFile does not exist.
*/
private void downloadToFile(File downloadFile, String url) throws IOException {
if (!downloadFile.exists()) {
int max = 3;
for (int trial = 0; trial < max; trial++) {
... | 3.68 |
flink_CompactingHashTable_resizeHashTable | /**
* Attempts to double the number of buckets
*
* @return true on success
* @throws IOException
*/
@VisibleForTesting
boolean resizeHashTable() throws IOException {
final int newNumBuckets = 2 * this.numBuckets;
final int bucketsPerSegment = this.bucketsPerSegmentMask + 1;
final int newNumSegments = (... | 3.68 |
hbase_MetricsConnection_decrConnectionCount | /** Decrement the connection count of the metrics within a scope */
private void decrConnectionCount() {
connectionCount.dec();
} | 3.68 |
framework_VCalendar_setLastHourOfTheDay | /**
* Set the last hour of the day.
*
* @param hour
* The last hour of the day
*/
public void setLastHourOfTheDay(int hour) {
assert (hour >= 0 && hour <= 23);
lastHour = hour;
} | 3.68 |
morf_RemoveColumn_isApplied | /**
* @see org.alfasoftware.morf.upgrade.SchemaChange#isApplied(Schema, ConnectionResources)
*/
@Override
public boolean isApplied(Schema schema, ConnectionResources database) {
// If we can't find the table assume we are not applied. If the table is removed
// in a subsequent step it is up to that step to mark i... | 3.68 |
flink_JoinInputSideSpec_withoutUniqueKey | /** Creates a {@link JoinInputSideSpec} that input hasn't any unique keys. */
public static JoinInputSideSpec withoutUniqueKey() {
return new JoinInputSideSpec(false, null, null);
} | 3.68 |
framework_SQLContainer_refresh | /**
* Refreshes the container. If <code>setSizeDirty</code> is
* <code>false</code>, assumes that the current size is up to date. This is
* used in {@link #updateCount()} to refresh the contents when we know the
* size was just updated.
*
* @param setSizeDirty
*/
private void refresh(boolean setSizeDirty) {
... | 3.68 |
flink_MessageSerializer_serializeRequestFailure | /**
* Serializes the exception containing the failure message sent to the {@link
* org.apache.flink.queryablestate.network.Client} in case of protocol related errors.
*
* @param alloc The {@link ByteBufAllocator} used to allocate the buffer to serialize the
* message into.
* @param requestId The id of the req... | 3.68 |
AreaShop_ImportJob_execute | /**
* Execute the job.
*/
private void execute() {
// Check for RegionForSale data
File regionForSaleFolder = new File(plugin.getDataFolder().getParentFile().getAbsolutePath(), "RegionForSale");
if(!regionForSaleFolder.exists()) {
message("import-noPluginFolder", regionForSaleFolder.getName());
return;
}
Fi... | 3.68 |
hbase_HBaseServerBase_getDataRootDir | /** Returns Return the rootDir. */
public Path getDataRootDir() {
return dataRootDir;
} | 3.68 |
hudi_PartitionFilterGenerator_buildPartitionExpression | /**
* Build expression from the Partition list. Here we're trying to match all partitions.
*
* ex. partitionSchema(date, hour) [Partition(2022-09-01, 12), Partition(2022-09-02, 13)] =>
* Or(And(Equal(Attribute(date), Literal(2022-09-01)), Equal(Attribute(hour), Literal(12))),
* And(Equal(Attribute(date), L... | 3.68 |
hadoop_StagingCommitter_getTaskOutput | /**
* Lists the output of a task under the task attempt path. Subclasses can
* override this method to change how output files are identified.
* <p>
* This implementation lists the files that are direct children of the output
* path and filters hidden files (file names starting with '.' or '_').
* <p>
* The task... | 3.68 |
pulsar_BundleSplitterTask_findBundlesToSplit | /**
* Determines which bundles should be split based on various thresholds.
*
* @param loadData
* Load data to base decisions on (does not have benefit of preallocated data since this may not be the
* leader broker).
* @param pulsar
* Service to use.
* @return All bundles who ha... | 3.68 |
flink_LogicalTypeMerging_findModuloDecimalType | /** Finds the result type of a decimal modulo operation. */
public static DecimalType findModuloDecimalType(
int precision1, int scale1, int precision2, int scale2) {
final int scale = Math.max(scale1, scale2);
int precision = Math.min(precision1 - scale1, precision2 - scale2) + scale;
return adjust... | 3.68 |
Activiti_BpmnActivityBehavior_performOutgoingBehavior | /**
* Actual implementation of leaving an activity.
* @param execution The current execution context
* @param checkConditions Whether or not to check conditions before determining whether or not to take a transition.
* @param throwExceptionIfExecutionStuck If true, an {@link ActivitiException} will be thrown in cas... | 3.68 |
flink_UserDefinedFunctionHelper_getReturnTypeOfAggregateFunction | /**
* Tries to infer the TypeInformation of an AggregateFunction's accumulator type.
*
* @param aggregateFunction The AggregateFunction for which the accumulator type is inferred.
* @param scalaType The implicitly inferred type of the accumulator type.
* @return The inferred accumulator type of the AggregateFuncti... | 3.68 |
hudi_BaseHoodieTableServiceClient_scheduleClusteringAtInstant | /**
* Schedules a new clustering instant with passed-in instant time.
*
* @param instantTime clustering Instant Time
* @param extraMetadata Extra Metadata to be stored
*/
public boolean scheduleClusteringAtInstant(String instantTime, Option<Map<String, String>> extraMetadata) throws HoodieIOException {
return ... | 3.68 |
hbase_MetaBrowser_addParam | /**
* Adds {@code value} to {@code encoder} under {@code paramName} when {@code value} is non-null.
*/
private void addParam(final QueryStringEncoder encoder, final String paramName,
final Object value) {
if (value != null) {
encoder.addParam(paramName, value.toString());
}
} | 3.68 |
framework_AbstractComponent_setIcon | /**
* Sets the component's icon.
*
* @param icon
* the icon to be shown with the component's caption.
*/
@Override
public void setIcon(Resource icon) {
setResource(ComponentConstants.ICON_RESOURCE, icon);
} | 3.68 |
hbase_RegionProcedureStore_runWithoutRpcCall | /**
* Insert procedure may be called by master's rpc call. There are some check about the rpc call
* when mutate region. Here unset the current rpc call and set it back in finally block. See
* HBASE-23895 for more details.
*/
private void runWithoutRpcCall(Runnable runnable) {
Optional<RpcCall> rpcCall = RpcServe... | 3.68 |
flink_SinkFunction_finish | /**
* This method is called at the end of data processing.
*
* <p>The method is expected to flush all remaining buffered data. Exceptions will cause the
* pipeline to be recognized as failed, because the last data items are not processed properly.
* You may use this method to flush remaining buffered elements in t... | 3.68 |
framework_AbstractRemoteDataSource_unpinHandle | /**
* Unpins a previously pinned row with given handle. This function can be
* overridden to do specific logic related to unpinning rows.
*
* @param handle
* row handle to unpin
*
* @throws IllegalStateException
* if given row handle has not been pinned before
*/
protected void unpinHand... | 3.68 |
dubbo_ConfigurationUtils_getProperty | /**
* For compact single instance
*
* @deprecated Replaced to {@link ConfigurationUtils#getProperty(ScopeModel, String, String)}
*/
@Deprecated
public static String getProperty(String property, String defaultValue) {
return getProperty(ApplicationModel.defaultModel(), property, defaultValue);
} | 3.68 |
hudi_InternalDynamicBloomFilter_addRow | /**
* Adds a new row to <i>this</i> dynamic Bloom filter.
*/
private void addRow() {
InternalBloomFilter[] tmp = new InternalBloomFilter[matrix.length + 1];
System.arraycopy(matrix, 0, tmp, 0, matrix.length);
tmp[tmp.length - 1] = new InternalBloomFilter(vectorSize, nbHash, hashType);
matrix = tmp;
} | 3.68 |
flink_AsyncSinkWriter_snapshotState | /**
* All in-flight requests that are relevant for the snapshot have been completed, but there may
* still be request entries in the internal buffers that are yet to be sent to the endpoint.
* These request entries are stored in the snapshot state so that they don't get lost in case of
* a failure/restart of the ap... | 3.68 |
framework_VTooltip_showTooltip | /**
* Show a popup containing the currentTooltipInfo
*
*/
private void showTooltip() {
if (currentTooltipInfo.hasMessage()) {
// Issue #8454: With IE7 the tooltips size is calculated based on
// the last tooltip's position, causing problems if the last one was
// in the right or bottom ed... | 3.68 |
flink_TemplateUtils_asFunctionTemplatesForProcedure | /** Converts {@link ProcedureHint}s to {@link FunctionTemplate}. */
static Set<FunctionTemplate> asFunctionTemplatesForProcedure(
DataTypeFactory typeFactory, Set<ProcedureHint> hints) {
return hints.stream()
.map(
hint -> {
try {
... | 3.68 |
framework_AbstractContainer_getPropertySetChangeListeners | /**
* Returns the property set change listener collection. For internal use
* only.
*/
protected Collection<Container.PropertySetChangeListener> getPropertySetChangeListeners() {
return propertySetChangeListeners;
} | 3.68 |
framework_Tree_setItemIconAlternateText | /**
* Set the alternate text for an item.
*
* Used when the item has an icon.
*
* @param itemId
* the id of the item to be assigned an icon.
* @param altText
* the alternative text for the icon
*/
public void setItemIconAlternateText(Object itemId, String altText) {
if (itemId != null... | 3.68 |
hadoop_SnappyCompressor_setDictionary | /**
* Does nothing.
*/
@Override
public void setDictionary(byte[] b, int off, int len) {
// do nothing
} | 3.68 |
hadoop_StagingCommitter_useUniqueFilenames | /**
* Is this committer using unique filenames?
* @return true if unique filenames are used.
*/
public Boolean useUniqueFilenames() {
return uniqueFilenames;
} | 3.68 |
pulsar_PulsarSaslServer_getAuthorizationID | /**
* Reports the authorization ID in effect for the client of this
* session.
* This method can only be called if isComplete() returns true.
* @return The authorization ID of the client.
* @exception IllegalStateException if this authentication session has not completed
*/
public String getAuthorizationID() thro... | 3.68 |
hadoop_Quota_eachByStorageType | /**
* Invoke consumer by each storage type.
* @param consumer the function consuming the storage type.
*/
public static void eachByStorageType(Consumer<StorageType> consumer) {
for (StorageType type : StorageType.values()) {
consumer.accept(type);
}
} | 3.68 |
morf_SqlDialect_getSqlForLeast | /**
* Converts the least function into SQL.
*
* @param function the function details
* @return a string representation of the SQL
*/
protected String getSqlForLeast(Function function) {
return getLeastFunctionName() + '(' + Joiner.on(", ").join(function.getArguments().stream().map(f -> getSqlFrom(f)).iterator())... | 3.68 |
flink_MemorySegment_putShortBigEndian | /**
* Writes the given short integer value (16 bit, 2 bytes) to the given position in big-endian
* byte order. This method's speed depends on the system's native byte order, and it is possibly
* slower than {@link #putShort(int, short)}. For most cases (such as transient storage in
* memory or serialization for I/O... | 3.68 |
hbase_ClusterStatusListener_isDeadServer | /**
* Check if we know if a server is dead.
* @param sn the server name to check.
* @return true if we know for sure that the server is dead, false otherwise.
*/
public boolean isDeadServer(ServerName sn) {
if (sn.getStartcode() <= 0) {
return false;
}
for (ServerName dead : deadServers) {
if (
... | 3.68 |
hadoop_DefaultNoHARMFailoverProxyProvider_close | /**
* Close the current proxy.
* @throws IOException io error occur.
*/
@Override
public void close() throws IOException {
RPC.stopProxy(proxy);
} | 3.68 |
zxing_CameraManager_startPreview | /**
* Asks the camera hardware to begin drawing preview frames to the screen.
*/
public synchronized void startPreview() {
OpenCamera theCamera = camera;
if (theCamera != null && !previewing) {
theCamera.getCamera().startPreview();
previewing = true;
autoFocusManager = new AutoFocusManager(context, th... | 3.68 |
framework_Table_unregisterComponent | /**
* This method cleans up a Component that has been generated when Table is
* in editable mode. The component needs to be detached from its parent and
* if it is a field, it needs to be detached from its property data source
* in order to allow garbage collection to take care of removing the unused
* component f... | 3.68 |
hbase_SnapshotManifest_getRegionNameFromManifest | /**
* Extract the region encoded name from the region manifest
*/
static String getRegionNameFromManifest(final SnapshotRegionManifest manifest) {
byte[] regionName =
RegionInfo.createRegionName(ProtobufUtil.toTableName(manifest.getRegionInfo().getTableName()),
manifest.getRegionInfo().getStartKey().toByt... | 3.68 |
framework_Table_removeColumnCollapseListener | /**
* Removes a column reorder listener from the Table.
*
* @since 7.6
* @param listener
* The listener to remove
*/
public void removeColumnCollapseListener(ColumnCollapseListener listener) {
removeListener(TableConstants.COLUMN_COLLAPSE_EVENT_ID,
ColumnCollapseEvent.class, listener);
... | 3.68 |
hadoop_OBSCommonUtils_getMultipartSizeProperty | /**
* Get a size property from the configuration: this property must be at least
* equal to {@link OBSConstants#MULTIPART_MIN_SIZE}. If it is too small, it is
* rounded up to that minimum, and a warning printed.
*
* @param conf configuration
* @param property property name
* @param defVal default value
* ... | 3.68 |
hadoop_YarnConfigurationStore_getUser | /**
* Get user who requested configuration change.
* @return user who requested configuration change
*/
public String getUser() {
return user;
} | 3.68 |
framework_CalendarTest_createCalendarEventPopup | /* Initializes a modal window to edit schedule event. */
private void createCalendarEventPopup() {
VerticalLayout layout = new VerticalLayout();
// layout.setMargin(true);
layout.setSpacing(true);
scheduleEventPopup = new Window(null, layout);
scheduleEventPopup.setWidth("300px");
scheduleEvent... | 3.68 |
druid_RandomDataSourceValidateThread_logSuccessTime | /**
* Provide a static method to record the last success time of a DataSource
*/
public static void logSuccessTime(DataSourceProxy dataSource) {
if (dataSource != null && !StringUtils.isEmpty(dataSource.getName())) {
String name = dataSource.getName();
long time = System.currentTimeMillis();
... | 3.68 |
flink_Configuration_addAllToProperties | /** Adds all entries in this {@code Configuration} to the given {@link Properties}. */
public void addAllToProperties(Properties props) {
synchronized (this.confData) {
for (Map.Entry<String, Object> entry : this.confData.entrySet()) {
props.put(entry.getKey(), entry.getValue());
}
}... | 3.68 |
hudi_HoodieCombineHiveInputFormat_inputFormatClassName | /**
* Returns the inputFormat class name for the i-th chunk.
*/
public String inputFormatClassName() {
return inputFormatClassName;
} | 3.68 |
querydsl_SimpleExpression_isNull | /**
* Create a {@code this is null} expression
*
* @return this is null
*/
public BooleanExpression isNull() {
if (isnull == null) {
isnull = Expressions.booleanOperation(Ops.IS_NULL, mixin);
}
return isnull;
} | 3.68 |
hadoop_TFile_compare | /**
* Provide a customized comparator for Entries. This is useful if we
* have a collection of Entry objects. However, if the Entry objects
* come from different TFiles, users must ensure that those TFiles share
* the same RawComparator.
*/
@Override
public int compare(Scanner.Entry o1, Scanner.Entry o2) {
retur... | 3.68 |
hadoop_CopyOutputFormat_checkOutputSpecs | /** {@inheritDoc} */
@Override
public void checkOutputSpecs(JobContext context) throws IOException {
Configuration conf = context.getConfiguration();
if (getCommitDirectory(conf) == null) {
throw new IllegalStateException("Commit directory not configured");
}
Path workingPath = getWorkingDirectory(conf);
... | 3.68 |
hbase_AbstractSaslClientAuthenticationProvider_hashCode | /**
* Provides a hash code to identify this AuthenticationProvider among others. These two fields
* must be unique to ensure that authentication methods are clearly separated.
*/
@Override
public final int hashCode() {
return getSaslAuthMethod().hashCode();
} | 3.68 |
flink_BufferBuilder_append | /**
* Append as many data as possible from {@code source}. Not everything might be copied if there
* is not enough space in the underlying {@link MemorySegment}
*
* @return number of copied bytes
*/
public int append(ByteBuffer source) {
checkState(!isFinished());
int needed = source.remaining();
int ... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.