name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_AbfsCountersImpl_toMap | /**
* {@inheritDoc}
*
* Map of all the counters for testing.
*
* @return a map of the IOStatistics counters.
*/
@VisibleForTesting
@Override
public Map<String, Long> toMap() {
return ioStatisticsStore.counters();
} | 3.68 |
hbase_RowResource_checkAndPut | /**
* Validates the input request parameters, parses columns from CellSetModel, and invokes
* checkAndPut on HTable.
* @param model instance of CellSetModel
* @return Response 200 OK, 304 Not modified, 400 Bad request
*/
Response checkAndPut(final CellSetModel model) {
Table table = null;
try {
table = ser... | 3.68 |
hbase_CellVisibility_quote | /**
* Helps in quoting authentication Strings. Use this if unicode characters to be used in
* expression or special characters like '(', ')', '"','\','&','|','!'
*/
public static String quote(byte[] auth) {
int escapeChars = 0;
for (int i = 0; i < auth.length; i++)
if (auth[i] == '"' || auth[i] == '\\')... | 3.68 |
morf_FieldReference_field | /**
* Constructs a new field with an alias on a given table.
*
* @param table the table on which the field exists
* @param name the name of the field.
* @return The field reference.
*/
public static Builder field(TableReference table, String name) {
return new Builder(table, name);
} | 3.68 |
morf_HumanReadableStatementHelper_generateMergeStatementString | /**
* Generates a human-readable description of a data merge operation.
*
* @param statement the data upgrade statement to describe.
* @return a string containing the human-readable description of the operation.
*/
private static String generateMergeStatementString(final MergeStatement statement) {
final SelectS... | 3.68 |
flink_BackgroundTask_abort | /**
* Abort the execution of this background task. This method has only an effect if the background
* task has not been started yet.
*/
void abort() {
isAborted = true;
} | 3.68 |
hadoop_AbstractTracking_copy | /**
* Subclass instances may call this method during cloning to copy the values of
* all properties stored in this base class.
*
* @param dest AbstractTracking destination for copying properties
*/
protected void copy(AbstractTracking dest) {
dest.beginTime = beginTime;
dest.endTime = endTime;
} | 3.68 |
dubbo_DefaultApplicationDeployer_initialize | /**
* Initialize
*/
@Override
public void initialize() {
if (initialized) {
return;
}
// Ensure that the initialization is completed when concurrent calls
synchronized (startLock) {
if (initialized) {
return;
}
onInitialize();
// register shutdown h... | 3.68 |
flink_StreamTaskNetworkInput_getRecordDeserializers | // Initialize one deserializer per input channel
private static Map<
InputChannelInfo,
SpillingAdaptiveSpanningRecordDeserializer<
DeserializationDelegate<StreamElement>>>
getRecordDeserializers(
CheckpointedInputGate checkpointedInputGate,... | 3.68 |
flink_ExecutionConfig_setGlobalJobParameters | /**
* Register a custom, serializable user configuration object.
*
* @param globalJobParameters Custom user configuration object
*/
public void setGlobalJobParameters(GlobalJobParameters globalJobParameters) {
Preconditions.checkNotNull(globalJobParameters, "globalJobParameters shouldn't be null");
setGloba... | 3.68 |
rocketmq-connect_Worker_startTask | /**
* start task
*
* @param newTasks
* @throws Exception
*/
private void startTask(Map<String, List<ConnectKeyValue>> newTasks) throws Exception {
for (String connectorName : newTasks.keySet()) {
for (ConnectKeyValue keyValue : newTasks.get(connectorName)) {
int taskId = keyValue.getInt(Con... | 3.68 |
flink_SingleInputOperator_accept | /**
* Accepts the visitor and applies it this instance. The visitors pre-visit method is called
* and, if returning <tt>true</tt>, the visitor is recursively applied on the single input.
* After the recursion returned, the post-visit method is called.
*
* @param visitor The visitor.
* @see org.apache.flink.util.V... | 3.68 |
flink_RoundRobinOperatorStateRepartitioner_repartitionUnionState | /** Repartition UNION state. */
private void repartitionUnionState(
Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>>
unionState,
List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) {
for (Map<StreamStateHandle, OperatorStateHandle> mergeMap... | 3.68 |
hbase_SegmentFactory_createImmutableSegmentByFlattening | // create flat immutable segment from non-flat immutable segment
// for flattening
public ImmutableSegment createImmutableSegmentByFlattening(CSLMImmutableSegment segment,
CompactingMemStore.IndexType idxType, MemStoreSizing memstoreSizing,
MemStoreCompactionStrategy.Action action) {
ImmutableSegment res = null;
... | 3.68 |
pulsar_WindowManager_getEventCount | /**
* Scans the event queue and returns number of events having
* timestamp less than or equal to the reference time.
*
* @param referenceTime the reference timestamp in millis
* @return the count of events with timestamp less than or equal to referenceTime
*/
public int getEventCount(long referenceTime) {
in... | 3.68 |
flink_JarManifestParser_findOnlyEntryClass | /**
* Returns a JAR file with its entry class as specified in the manifest.
*
* @param jarFiles JAR files to parse
* @throws NoSuchElementException if no JAR file contains an entry class attribute
* @throws IllegalArgumentException if multiple JAR files contain an entry class manifest
* attribute
*/
static J... | 3.68 |
framework_DesignAttributeHandler_getFormatter | /**
* Returns the currently used formatter. All primitive types and all types
* needed by Vaadin components are handled by that formatter.
*
* @return An instance of the formatter.
*/
public static DesignFormatter getFormatter() {
return FORMATTER;
} | 3.68 |
hbase_KeyValue_getQualifierLength | /** Returns Qualifier length */
int getQualifierLength(int keyLength, int rlength, int flength) {
return keyLength - (int) getKeyDataStructureSize(rlength, flength, 0);
} | 3.68 |
morf_DatabaseType_findByIdentifier | /**
* Returns the registered database type by its identifier.
*
* <p>It can be assumed that performance of this method will be <code>O(1)</code> so is
* suitable for repeated calling in performance code. There should be
* few reasons for caching the response.</p>
*
* @param identifier The database type identifi... | 3.68 |
hbase_HRegion_replayWALCompactionMarker | /**
* Call to complete a compaction. Its for the case where we find in the WAL a compaction that was
* not finished. We could find one recovering a WAL after a regionserver crash. See HBASE-2331.
*/
void replayWALCompactionMarker(CompactionDescriptor compaction, boolean pickCompactionFiles,
boolean removeFiles, lo... | 3.68 |
hbase_KeyValue_getKey | /**
* Do not use unless you have to. Used internally for compacting and testing. Use
* {@link #getRowArray()}, {@link #getFamilyArray()}, {@link #getQualifierArray()}, and
* {@link #getValueArray()} if accessing a KeyValue client-side.
* @return Copy of the key portion only.
*/
public byte[] getKey() {
int keyle... | 3.68 |
morf_MySqlDialect_getSqlForDateToYyyymmddHHmmss | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#getSqlForDateToYyyymmddHHmmss(org.alfasoftware.morf.sql.element.Function)
*/
@Override
protected String getSqlForDateToYyyymmddHHmmss(Function function) {
return String.format("CAST(DATE_FORMAT(%s, '%%Y%%m%%d%%H%%i%%s') AS DECIMAL(14))",getSqlFrom(function.getArgumen... | 3.68 |
framework_HasHierarchicalDataProvider_getTreeData | /**
* Gets the backing {@link TreeData} instance of the data provider, if the
* data provider is a {@link TreeDataProvider}.
*
* @return the TreeData instance used by the data provider
* @throws IllegalStateException
* if the type of the data provider is not
* {@link TreeDataProvider}
*/... | 3.68 |
hadoop_RegistryOperationsService_getClientAcls | /**
* Get the aggregate set of ACLs the client should use
* to create directories
* @return the ACL list
*/
public List<ACL> getClientAcls() {
return getRegistrySecurity().getClientACLs();
} | 3.68 |
flink_MutableHashTable_assignPartition | /**
* Assigns a partition to a bucket.
*
* @param bucket The bucket to get the partition for.
* @param numPartitions The number of partitions.
* @return The partition for the bucket.
*/
public static byte assignPartition(int bucket, byte numPartitions) {
return (byte) (bucket % numPartitions);
} | 3.68 |
framework_VCustomLayout_setWidget | /**
* Sets widget to given location.
*
* If location already contains a widget it will be removed.
*
* @param widget
* Widget to be set into location.
* @param location
* location name where widget will be added
*
* @throws IllegalArgumentException
* if no such location is f... | 3.68 |
graphhopper_AStar_setApproximation | /**
* @param approx defines how distance to goal Node is approximated
*/
public AStar setApproximation(WeightApproximator approx) {
weightApprox = approx;
return this;
} | 3.68 |
hbase_QuotaTableUtil_doGet | /*
* ========================================================================= HTable helpers
*/
protected static Result doGet(final Connection connection, final Get get) throws IOException {
try (Table table = connection.getTable(QUOTA_TABLE_NAME)) {
return table.get(get);
}
} | 3.68 |
flink_ErrorInfo_handleMissingThrowable | /**
* Utility method to cover FLINK-21376.
*
* @param throwable The actual exception.
* @return a {@link FlinkException} if no exception was passed.
*/
public static Throwable handleMissingThrowable(@Nullable Throwable throwable) {
return throwable != null
? throwable
: new FlinkExcepti... | 3.68 |
hadoop_ConsistentHashRing_addLocation | /**
* Add entry to consistent hash ring.
*
* @param location Node to add to the ring.
* @param numVirtualNodes Number of virtual nodes to add.
*/
public void addLocation(String location, int numVirtualNodes) {
writeLock.lock();
try {
entryToVirtualNodes.put(location, numVirtualNodes);
for (int i = 0; i... | 3.68 |
framework_DataProvider_fromStream | /**
* Creates a new data provider from the given stream. <b>All items in the
* stream are eagerly collected to a list.</b>
* <p>
* This is a shorthand for using {@link #ofCollection(Collection)} after
* collecting the items in the stream to a list with e.g.
* {@code stream.collect(Collectors.toList));}.
* <p>
*... | 3.68 |
hbase_HttpServer_setAttribute | /**
* Set a value in the webapp context. These values are available to the jsp pages as
* "application.getAttribute(name)".
* @param name The name of the attribute
* @param value The value of the attribute
*/
public void setAttribute(String name, Object value) {
webAppContext.setAttribute(name, value);
} | 3.68 |
hbase_ZKNodeTracker_postStart | /**
* Called after start is called. Sub classes could implement this method to load more data on zk.
*/
protected void postStart() {
} | 3.68 |
hbase_SimpleRegionNormalizer_getMergeMinRegionCount | /**
* Return this instance's configured value for {@value #MERGE_MIN_REGION_COUNT_KEY}.
*/
public int getMergeMinRegionCount() {
return normalizerConfiguration.getMergeMinRegionCount();
} | 3.68 |
framework_LegacyApplication_removeWindow | /**
* Removes the specified window from the application. This also removes all
* name mappings for the window (see {@link #addWindow(LegacyWindow)} and
* #getWindowName(UI)}.
*
* <p>
* Note that removing window from the application does not close the browser
* window - the window is only removed from the server-... | 3.68 |
hbase_HFileBlock_isUnpacked | /**
* Return true when this block's buffer has been unpacked, false otherwise. Note this is a
* calculated heuristic, not tracked attribute of the block.
*/
public boolean isUnpacked() {
final int headerSize = headerSize();
final int expectedCapacity = headerSize + uncompressedSizeWithoutHeader;
final int bufC... | 3.68 |
framework_AbstractInMemoryContainer_getItemSorter | /**
* Returns the ItemSorter used for comparing items in a sort. See
* {@link #setItemSorter(ItemSorter)} for more information.
*
* @return The ItemSorter used for comparing two items in a sort.
*/
protected ItemSorter getItemSorter() {
return itemSorter;
} | 3.68 |
flink_JoinInputSideSpec_withUniqueKeyContainedByJoinKey | /**
* Creates a {@link JoinInputSideSpec} that input has an unique key and the unique key is
* contained by the join key.
*
* @param uniqueKeyType type information of the unique key
* @param uniqueKeySelector key selector to extract unique key from the input row
*/
public static JoinInputSideSpec withUniqueKeyCon... | 3.68 |
querydsl_JTSGeometryExpression_within | /**
* Returns 1 (TRUE) if this geometric object is “spatially within” anotherGeometry.
*
* @param geometry other geometry
* @return true, if within
*/
public BooleanExpression within(Expression<? extends Geometry> geometry) {
return Expressions.booleanOperation(SpatialOps.WITHIN, mixin, geometry);
} | 3.68 |
flink_Tuple5_setFields | /**
* Sets new values to all fields of the tuple.
*
* @param f0 The value for field 0
* @param f1 The value for field 1
* @param f2 The value for field 2
* @param f3 The value for field 3
* @param f4 The value for field 4
*/
public void setFields(T0 f0, T1 f1, T2 f2, T3 f3, T4 f4) {
this.f0 = f0;
this.f... | 3.68 |
hadoop_AppToFlowTableRW_createTable | /*
* (non-Javadoc)
*
* @see
* org.apache.hadoop.yarn.server.timelineservice.storage.BaseTableRW#
* createTable(org.apache.hadoop.hbase.client.Admin,
* org.apache.hadoop.conf.Configuration)
*/
public void createTable(Admin admin, Configuration hbaseConf)
throws IOException {
TableName table = getTableName(... | 3.68 |
hbase_ScanQueryMatcher_compareKeyForNextColumn | /**
* @param nextIndexed the key of the next entry in the block index (if any)
* @param currentCell The Cell we're using to calculate the seek key
* @return result of the compare between the indexed key and the key portion of the passed cell
*/
public int compareKeyForNextColumn(Cell nextIndexed, Cell currentCell) ... | 3.68 |
flink_LocalSlicingWindowAggOperator_computeMemorySize | /** Compute memory size from memory faction. */
private long computeMemorySize() {
final Environment environment = getContainingTask().getEnvironment();
return environment
.getMemoryManager()
.computeMemorySize(
getOperatorConfig()
.getMana... | 3.68 |
dubbo_ServiceAnnotationPostProcessor_resolveBeanNameGenerator | /**
* It'd be better to use BeanNameGenerator instance that should reference
* {@link ConfigurationClassPostProcessor#componentScanBeanNameGenerator},
* thus it maybe a potential problem on bean name generation.
*
* @param registry {@link BeanDefinitionRegistry}
* @return {@link BeanNameGenerator} instance
* @se... | 3.68 |
framework_VScrollTable_instructServerToForgetPreviousSelections | /**
* Used in multiselect mode when the client side knows that all selections
* are in the next request.
*/
private void instructServerToForgetPreviousSelections() {
client.updateVariable(paintableId, "clearSelections", true, false);
} | 3.68 |
framework_Window_setTabStopEnabled | /**
* Set if it should be prevented to set the focus to a component outside a
* non-modal window with the tab key.
* <p>
* This is meant to help users of assistive devices to not leaving the
* window unintentionally.
* <p>
* For modal windows, this function is activated automatically, while
* preserving the sto... | 3.68 |
hadoop_JobBase_addDoubleValue | /**
* Increment the given counter by the given incremental value If the counter
* does not exist, one is created with value 0.
*
* @param name
* the counter name
* @param inc
* the incremental value
* @return the updated value.
*/
protected Double addDoubleValue(Object name, double inc) {
... | 3.68 |
AreaShop_Materials_signNameToMaterial | /**
* Get material based on a sign material name.
* @param name Name of the sign material
* @return null if not a sign, otherwise the material matching the name (when the material is not available on the current minecraft version, it returns the base type)
*/
public static Material signNameToMaterial(String name) {... | 3.68 |
dubbo_TTable_has | /**
* whether has one of the specified border styles
*
* @param borderArray border styles
* @return whether has one of the specified border styles
*/
public boolean has(int... borderArray) {
if (null == borderArray) {
return false;
}
for (int b : borderArray) {
if ((this.borders & b) ==... | 3.68 |
flink_RocksDBMemoryConfiguration_setFixedMemoryPerSlot | /**
* Configures RocksDB to use a fixed amount of memory shared between all instances (operators)
* in a slot. See {@link #setFixedMemoryPerSlot(MemorySize)} for details.
*/
public void setFixedMemoryPerSlot(String totalMemoryPerSlotStr) {
setFixedMemoryPerSlot(MemorySize.parse(totalMemoryPerSlotStr));
} | 3.68 |
flink_FactoryUtils_loadAndInvokeFactory | /**
* Loads all factories for the given class using the {@link ServiceLoader} and attempts to
* create an instance.
*
* @param factoryInterface factory interface
* @param factoryInvoker factory invoker
* @param defaultProvider default factory provider
* @param <R> resource type
* @param <F> factory type
* @thr... | 3.68 |
pulsar_AuthorizationProvider_removePermissionsAsync | /**
* Remove authorization-action permissions on a topic.
* @param topicName
* @return CompletableFuture<Void>
*/
default CompletableFuture<Void> removePermissionsAsync(TopicName topicName) {
return CompletableFuture.completedFuture(null);
} | 3.68 |
hbase_HFileOutputFormat2_createFamilyCompressionMap | /**
* Runs inside the task to deserialize column family to compression algorithm map from the
* configuration.
* @param conf to read the serialized values from
* @return a map from column family to the configured compression algorithm
*/
@InterfaceAudience.Private
static Map<byte[], Algorithm> createFamilyCompress... | 3.68 |
hudi_OptionsResolver_needsScheduleCompaction | /**
* Returns whether there is need to schedule the compaction plan.
*
* @param conf The flink configuration.
*/
public static boolean needsScheduleCompaction(Configuration conf) {
return OptionsResolver.isMorTable(conf)
&& conf.getBoolean(FlinkOptions.COMPACTION_SCHEDULE_ENABLED);
} | 3.68 |
pulsar_ResourceGroupService_registerTenant | /**
* Registers a tenant as a user of a resource group.
*
* @param resourceGroupName
* @param tenantName
* @throws if the RG does not exist, or if the NS already references the RG.
*/
public void registerTenant(String resourceGroupName, String tenantName) throws PulsarAdminException {
ResourceGroup rg = check... | 3.68 |
pulsar_ThreadLocalStateCleaner_cleanupThreadLocal | // cleanup thread local state on all active threads
public <T> void cleanupThreadLocal(ThreadLocal<?> threadLocal, BiConsumer<Thread, T> cleanedValueListener) {
Objects.nonNull(threadLocal);
for (Thread thread : ThreadUtils.getAllThreads()) {
cleanupThreadLocal(threadLocal, thread, cleanedValueListener)... | 3.68 |
hudi_BaseActionExecutor_writeTableMetadata | /**
* Writes restore metadata to table metadata.
* @param metadata restore metadata of interest.
*/
protected final void writeTableMetadata(HoodieRestoreMetadata metadata) {
Option<HoodieTableMetadataWriter> metadataWriterOpt = table.getMetadataWriter(instantTime);
if (metadataWriterOpt.isPresent()) {
try (H... | 3.68 |
hbase_QuotaTableUtil_getTableQuota | /*
* ========================================================================= Quota "settings"
* helpers
*/
public static Quotas getTableQuota(final Connection connection, final TableName table)
throws IOException {
return getQuotas(connection, getTableRowKey(table));
} | 3.68 |
aws-saas-boost_UpdateWorkflow_runApiGatewayDeployment | // VisibleForTesting
protected void runApiGatewayDeployment(Map<String, String> cloudFormationParamMap) {
// CloudFormation will not redeploy an API Gateway stage on update
outputMessage("Updating API Gateway deployment for stages");
try {
String publicApiName = "sb-" + environment.getName() + "-pub... | 3.68 |
flink_SSLUtils_createRestSSLContext | /** Creates an SSL context for clients against the external REST endpoint. */
@Nullable
@VisibleForTesting
public static SSLContext createRestSSLContext(Configuration config, boolean clientMode)
throws Exception {
ClientAuth clientAuth =
SecurityOptions.isRestSSLAuthenticationEnabled(config)
... | 3.68 |
hadoop_CacheDirectiveStats_getBytesNeeded | /**
* @return The bytes needed.
*/
public long getBytesNeeded() {
return bytesNeeded;
} | 3.68 |
dubbo_AbstractJSONImpl_getString | /**
* Gets a string from an object for the given key. If the key is not present, this returns null.
* If the value is not a String, throws an exception.
*/
@Override
public String getString(Map<String, ?> obj, String key) {
assert obj != null;
assert key != null;
if (!obj.containsKey(key)) {
ret... | 3.68 |
hudi_BaseCommitActionExecutor_validateWriteResult | /**
* Validate actions taken by clustering. In the first implementation, we validate at least one new file is written.
* But we can extend this to add more validation. E.g. number of records read = number of records written etc.
* We can also make these validations in BaseCommitActionExecutor to reuse pre-commit hoo... | 3.68 |
hbase_SlowLogTableAccessor_addSlowLogRecords | /**
* Add slow/large log records to hbase:slowlog table
* @param slowLogPayloads List of SlowLogPayload to process
* @param connection connection
*/
public static void addSlowLogRecords(final List<TooSlowLog.SlowLogPayload> slowLogPayloads,
Connection connection) {
List<Put> puts = new ArrayList<>(slowLogP... | 3.68 |
framework_VCustomLayout_scanForLocations | /** Collect locations from template */
private void scanForLocations(Element elem) {
if (elem.hasAttribute("location")) {
final String location = elem.getAttribute("location");
locationToElement.put(location, elem);
elem.setInnerHTML("");
} else if (elem.hasAttribute("data-location")) {
... | 3.68 |
flink_CompiledPlan_writeToFile | /**
* Writes this plan to a file using the JSON representation. This operation will fail if the
* file already exists, even if the content is different from this plan.
*
* @param file the target file
* @throws TableException if the file cannot be written.
*/
default void writeToFile(File file) {
writeToFile(f... | 3.68 |
AreaShop_GeneralRegion_setRestoreSetting | /**
* Change the restore setting.
* @param restore true, false or general
*/
public void setRestoreSetting(Boolean restore) {
setSetting("general.enableRestore", restore);
} | 3.68 |
hudi_HFileBootstrapIndex_writeNextSourceFileMapping | /**
* Write next source file to hudi file-id. Entries are expected to be appended in hudi file-group id
* order.
* @param mapping bootstrap source file mapping.
*/
private void writeNextSourceFileMapping(BootstrapFileMapping mapping) {
try {
HoodieBootstrapFilePartitionInfo srcFilePartitionInfo = new HoodieBo... | 3.68 |
hbase_ZKProcedureMemberRpcs_receivedReachedGlobalBarrier | /**
* Pass along the procedure global barrier notification to any listeners
* @param path full znode path that cause the notification
*/
private void receivedReachedGlobalBarrier(String path) {
LOG.debug("Received reached global barrier:" + path);
String procName = ZKUtil.getNodeName(path);
this.member.receive... | 3.68 |
hadoop_RegistryPathStatus_equals | /**
* Equality operator checks size, time and path of the entries.
* It does <i>not</i> check {@link #children}.
* @param other the other entry
* @return true if the entries are considered equal.
*/
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (other == null || g... | 3.68 |
hadoop_PartitionQueueMetrics_getUserMetrics | /**
* Partition * Queue * User Metrics
*
* Computes Metrics at Partition (Node Label) * Queue * User Level.
*
* Sample JMX O/P Structure:
*
* PartitionQueueMetrics (labelX)
* QueueMetrics (A)
* usermetrics
* QueueMetrics (A1)
* usermetrics
* QueueMetrics (A2)
* usermetrics
* QueueMetric... | 3.68 |
flink_MathUtils_checkedDownCast | /**
* Casts the given value to a 32 bit integer, if it can be safely done. If the cast would change
* the numeric value, this method raises an exception.
*
* <p>This method is a protection in places where one expects to be able to safely case, but
* where unexpected situations could make the cast unsafe and would ... | 3.68 |
hadoop_HamletImpl_root | /**
* Create a root-level generic element.
* Mostly for testing purpose.
* @param <T> type of the parent element
* @param name of the element
* @param opts {@link EOpt element options}
* @return the element
*/
public <T extends __>
Generic<T> root(String name, EnumSet<EOpt> opts) {
return new Generic<T>(name, ... | 3.68 |
framework_DateField_fireValueChange | /*
* only fires the event if preventValueChangeEvent flag is false
*/
@Override
protected void fireValueChange(boolean repaintIsNotNeeded) {
if (!preventValueChangeEvent) {
super.fireValueChange(repaintIsNotNeeded);
}
} | 3.68 |
hbase_JVMClusterUtil_getRegionServer | /** Returns the region server */
public HRegionServer getRegionServer() {
return this.regionServer;
} | 3.68 |
flink_MessageSerializer_serializeResponse | /**
* Serializes the response sent to the {@link org.apache.flink.queryablestate.network.Client}.
*
* @param alloc The {@link ByteBufAllocator} used to allocate the buffer to serialize the
* message into.
* @param requestId The id of the request to which the message refers to.
* @param response The response t... | 3.68 |
hadoop_ServiceLauncher_loadConfigurationClasses | /**
* @return This creates all the configurations defined by
* {@link #getConfigurationsToCreate()} , ensuring that
* the resources have been pushed in.
* If one cannot be loaded it is logged and the operation continues
* except in the case that the class does load but it isn't actually
* a subclass of {@link Con... | 3.68 |
flink_SourceOperator_checkSplitWatermarkAlignment | /**
* Finds the splits that are beyond the current max watermark and pauses them. At the same time,
* splits that have been paused and where the global watermark caught up are resumed.
*
* <p>Note: This takes effect only if there are multiple splits, otherwise it does nothing.
*/
private void checkSplitWatermarkAl... | 3.68 |
dubbo_JsonUtils_setJson | /**
* @deprecated for uts only
*/
@Deprecated
protected static void setJson(JSON json) {
JsonUtils.json = json;
} | 3.68 |
hbase_StoreUtils_getBytesPerChecksum | /**
* Returns the configured bytesPerChecksum value.
* @param conf The configuration
* @return The bytesPerChecksum that is set in the configuration
*/
public static int getBytesPerChecksum(Configuration conf) {
return conf.getInt(HConstants.BYTES_PER_CHECKSUM, HFile.DEFAULT_BYTES_PER_CHECKSUM);
} | 3.68 |
morf_DatabaseSchemaManager_dropAllViews | /**
* Drop all views.
*/
public void dropAllViews() {
ProducerCache producerCache = new ProducerCache();
log.debug("Dropping all views");
try {
Schema databaseSchema = producerCache.get().getSchema();
ImmutableList<View> viewsToDrop = ImmutableList.copyOf(databaseSchema.views());
List<String> script... | 3.68 |
hadoop_CosNFileSystem_listStatus | /**
* <p>
* If <code>f</code> is a file, this method will make a single call to COS.
* If <code>f</code> is a directory,
* this method will make a maximum of ( <i>n</i> / 199) + 2 calls to cos,
* where <i>n</i> is the total number of files
* and directories contained directly in <code>f</code>.
* </p>
*/
@Overr... | 3.68 |
hbase_ReplicationProtobufUtil_getCellScanner | /** Returns <code>cells</code> packaged as a CellScanner */
static CellScanner getCellScanner(final List<List<? extends Cell>> cells, final int size) {
return new SizedCellScanner() {
private final Iterator<List<? extends Cell>> entries = cells.iterator();
private Iterator<? extends Cell> currentIterator = nu... | 3.68 |
framework_AbstractListing_doReadDesign | /**
* Reads the listing specific state from the given design.
* <p>
* This method is separated from {@link #readDesign(Element, DesignContext)}
* to be overridable in subclasses that need to replace this, but still must
* be able to call {@code super.readDesign(...)}.
*
* @see #doWriteDesign(Element, DesignConte... | 3.68 |
hadoop_ClientGSIContext_mergeRouterFederatedState | /**
* Merge state1 and state2 to get the max value for each namespace.
* @param state1 input ByteString.
* @param state2 input ByteString.
* @return one ByteString object which contains the max value of each namespace.
*/
public static ByteString mergeRouterFederatedState(ByteString state1, ByteString state2) {
... | 3.68 |
flink_Savepoint_create | /**
* Creates a new savepoint.
*
* @param stateBackend The state backend of the savepoint used for keyed state.
* @param maxParallelism The max parallelism of the savepoint.
* @return A new savepoint.
* @see #create(int)
*/
public static NewSavepoint create(StateBackend stateBackend, int maxParallelism) {
Pr... | 3.68 |
hudi_HoodieTableMetadataUtil_getFileSystemView | /**
* Get metadata table file system view.
*
* @param metaClient - Metadata table meta client
* @return Filesystem view for the metadata table
*/
public static HoodieTableFileSystemView getFileSystemView(HoodieTableMetaClient metaClient) {
// If there are no commits on the metadata table then the table's
// de... | 3.68 |
morf_AbstractSqlDialectTest_expectedUpdateUsingTargetTableInDifferentSchema | /**
* @return The expected SQL for performing an update with a destination table which lives in a different schema.
*/
protected String expectedUpdateUsingTargetTableInDifferentSchema() {
return "UPDATE " + differentSchemaTableName("FloatingRateRate") + " A SET settlementFrequency = (SELECT settlementFrequency FROM... | 3.68 |
flink_ParameterTool_getProperties | /**
* Returns a {@link Properties} object from this {@link ParameterTool}.
*
* @return A {@link Properties}
*/
public Properties getProperties() {
Properties props = new Properties();
props.putAll(this.data);
return props;
} | 3.68 |
hbase_Random64_main | /**
* Random64 is a pseudorandom algorithm(LCG). Therefore, we will get same sequence if seeds are
* the same. This main will test how many calls nextLong() it will get the same seed. We do not
* need to save all numbers (that is too large). We could save once every 100000 calls nextLong().
* If it get a same seed,... | 3.68 |
hbase_TableName_toBytes | /** Returns A pointer to TableName as String bytes. */
public byte[] toBytes() {
return name;
} | 3.68 |
flink_PipelinedApproximateSubpartition_setIsPartialBufferCleanupRequired | /** for testing only. */
@VisibleForTesting
void setIsPartialBufferCleanupRequired() {
isPartialBufferCleanupRequired = true;
} | 3.68 |
hudi_Registry_getAllMetrics | /**
* Get all registered metrics.
*
* @param flush clear all metrics after this operation.
* @param prefixWithRegistryName prefix each metric name with the registry name.
* @return
*/
static Map<String, Long> getAllMetrics(boolean flush, boolean prefixWithRegistryName) {
synchronized (Registry.class) {
Hash... | 3.68 |
dubbo_ExpiringCache_put | /**
* API to store value against a key in the calling thread scope.
* @param key Unique identifier for the object being store.
* @param value Value getting store
*/
@Override
public void put(Object key, Object value) {
store.put(key, value);
} | 3.68 |
hudi_HoodieMergedLogRecordScanner_newBuilder | /**
* Returns the builder for {@code HoodieMergedLogRecordScanner}.
*/
public static HoodieMergedLogRecordScanner.Builder newBuilder() {
return new Builder();
} | 3.68 |
flink_KeyGroupPartitioner_partitionByKeyGroup | /**
* Partitions the data into key-groups and returns the result as a {@link PartitioningResult}.
*/
public PartitioningResult<T> partitionByKeyGroup() {
if (computedResult == null) {
reportAllElementKeyGroups();
int outputNumberOfElements = buildHistogramByAccumulatingCounts();
executePar... | 3.68 |
flink_TaskExecutorLocalStateStoresManager_retainLocalStateForAllocations | /**
* Retains the given set of allocations. All other allocations will be released.
*
* @param allocationsToRetain
*/
public void retainLocalStateForAllocations(Set<AllocationID> allocationsToRetain) {
final Collection<AllocationID> allocationIds = findStoredAllocations();
allocationIds.stream()
... | 3.68 |
framework_DragSourceExtensionConnector_addDraggedStyle | /**
* Add class name to indicate that the drag source element is being dragged.
* This method is called during the dragstart event.
*
* @param event
* The drag start event.
*/
protected void addDraggedStyle(NativeEvent event) {
Element dragSource = getDraggableElement();
dragSource.addClassName... | 3.68 |
flink_TieredStorageNettyServiceImpl_createResultSubpartitionView | /**
* Create a {@link ResultSubpartitionView} for the netty server.
*
* @param partitionId partition id indicates the unique id of {@link TieredResultPartition}.
* @param subpartitionId subpartition id indicates the unique id of subpartition.
* @param availabilityListener listener is used to listen the available s... | 3.68 |
flink_MutableHashTable_nextSegment | /**
* This is the method called by the partitions to request memory to serialize records. It
* automatically spills partitions, if memory runs out.
*
* @return The next available memory segment.
*/
@Override
public MemorySegment nextSegment() {
final MemorySegment seg = getNextBuffer();
if (seg != null) {
... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.