name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_StateStoreSerializableImpl_getOriginalPrimaryKey | /**
* Get the original primary key for the given state store record key. The returned
* key is readable as it is the original key.
*
* @param stateStoreRecordKey The record primary key stored by the state store implementations.
* @return The original primary key for the given record key.
*/
protected static Strin... | 3.68 |
flink_ModuleManager_getFactory | /**
* Returns the first factory found in the loaded modules given a selector.
*
* <p>Modules are checked in the order in which they have been loaded. The first factory
* returned by a module will be used. If no loaded module provides a factory, {@link
* Optional#empty()} is returned.
*/
@SuppressWarnings("uncheck... | 3.68 |
pulsar_KerberosName_replaceParameters | /**
* Replace the numbered parameters of the form $n where n is from 1 to
* the length of params. Normal text is copied directly and $n is replaced
* by the corresponding parameter.
* @param format the string to replace parameters again
* @param params the list of parameters
* @return the generated string with th... | 3.68 |
hadoop_FlowRunRowKey_getRowKey | /**
* Constructs a row key for the entity table as follows: {
* clusterId!userId!flowName!Inverted Flow Run Id}.
*
* @return byte array with the row key
*/
public byte[] getRowKey() {
return flowRunRowKeyConverter.encode(this);
} | 3.68 |
hadoop_LogAggregationWebUtils_getLogStartTime | /**
* Parse log start time from html.
* @param startStr the start time string
* @return the startIndex
*/
public static long getLogStartTime(String startStr)
throws NumberFormatException {
long start = 0;
if (startStr != null && !startStr.isEmpty()) {
start = Long.parseLong(startStr);
}
return star... | 3.68 |
flink_Transformation_getParallelism | /** Returns the parallelism of this {@code Transformation}. */
public int getParallelism() {
return parallelism;
} | 3.68 |
framework_CustomizedSystemMessages_setSessionExpiredNotificationEnabled | /**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly when next transaction between server and
* client happens.
*
* @param sessionExpiredNotificationEnabled
* true = enabled, false = disabled
*/
public void setSessionExpiredNotificationEnabled(
... | 3.68 |
AreaShop_GeneralRegion_removelandlord | /**
* Remove the landlord from this region.
*/
public void removelandlord() {
setSetting("general.landlord", null);
setSetting("general.landlordName", null);
} | 3.68 |
hadoop_SchedulerNodeReport_getUsedResource | /**
* @return the amount of resources currently used by the node.
*/
public Resource getUsedResource() {
return used;
} | 3.68 |
streampipes_InfluxDbClient_loadColumns | // Client must be connected before calling this method
void loadColumns() throws AdapterException {
if (!connected) {
throw new AdapterException("Client must be connected to the server in order to load the columns.");
}
List<List<Object>> fieldKeys = query("SHOW FIELD KEYS FROM " + measureName);
... | 3.68 |
framework_VaadinService_removeSession | /**
* Called when the VaadinSession should be removed from the underlying HTTP
* session.
*
* @since 7.6
* @param wrappedSession
* the underlying HTTP session
*/
public void removeSession(WrappedSession wrappedSession) {
assert VaadinSession.hasLock(this, wrappedSession);
removeFromHttpSession... | 3.68 |
AreaShop_GeneralRegion_handleSchematicEvent | /**
* Checks an event and handles saving to and restoring from schematic for it.
* @param type The type of event
*/
public void handleSchematicEvent(RegionEvent type) {
// Check the individual>group>default setting
if(!isRestoreEnabled()) {
AreaShop.debug("Schematic operations for " + getName() + " not enabled, ... | 3.68 |
hbase_MasterFileSystem_getClusterId | /** Returns The unique identifier generated for this cluster */
public ClusterId getClusterId() {
return clusterId;
} | 3.68 |
hbase_ImmutableBytesWritable_copyBytes | /** Returns a copy of the bytes referred to by this writable */
public byte[] copyBytes() {
return Arrays.copyOfRange(bytes, offset, offset + length);
} | 3.68 |
hadoop_FileSetUtils_getCommaSeparatedList | /**
* Returns a string containing every element of the given list, with each
* element separated by a comma.
*
* @param list List of all elements
* @return String containing every element, comma-separated
*/
private static String getCommaSeparatedList(List<String> list) {
StringBuilder buffer = new StringBuild... | 3.68 |
flink_ImperativeAggregateFunction_getAccumulatorType | /**
* Returns the {@link TypeInformation} of the {@link ImperativeAggregateFunction}'s accumulator.
*
* @return The {@link TypeInformation} of the {@link ImperativeAggregateFunction}'s accumulator
* or <code>null</code> if the accumulator type should be automatically inferred.
* @deprecated This method uses th... | 3.68 |
hbase_AuthManager_authorizeUserGlobal | /**
* Check if user has given action privilige in global scope.
* @param user user name
* @param action one of action in [Read, Write, Create, Exec, Admin]
* @return true if user has, false otherwise
*/
public boolean authorizeUserGlobal(User user, Permission.Action action) {
if (user == null) {
return fal... | 3.68 |
hadoop_DiskBalancerWorkItem_setStartTime | /**
* Sets the Start time.
* @param startTime - Time stamp for start of execution.
*/
public void setStartTime(long startTime) {
this.startTime = startTime;
} | 3.68 |
graphhopper_VectorTile_setId | /**
* <code>optional uint64 id = 1 [default = 0];</code>
*/
public Builder setId(long value) {
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
} | 3.68 |
zxing_CodaBarReader_setCounters | /**
* Records the size of all runs of white and black pixels, starting with white.
* This is just like recordPattern, except it records all the counters, and
* uses our builtin "counters" member for storage.
* @param row row to count from
*/
private void setCounters(BitArray row) throws NotFoundException {
count... | 3.68 |
morf_RecreateOracleSequences_getJiraId | /**
* @see org.alfasoftware.morf.upgrade.UpgradeStep#getJiraId()
*/
@Override
public String getJiraId() {
return "WEB-51306";
} | 3.68 |
flink_DecodingFormat_listReadableMetadata | /**
* Returns the map of metadata keys and their corresponding data types that can be produced by
* this format for reading. By default, this method returns an empty map.
*
* <p>Metadata columns add additional columns to the table's schema. A decoding format is
* responsible to add requested metadata columns at th... | 3.68 |
flink_SlotPoolService_castInto | /**
* Tries to cast this slot pool service into the given clazz.
*
* @param clazz to cast the slot pool service into
* @param <T> type of clazz
* @return {@link Optional#of} the target type if it can be cast; otherwise {@link
* Optional#empty()}
*/
default <T> Optional<T> castInto(Class<T> clazz) {
if (c... | 3.68 |
hbase_SingleColumnValueFilter_isFamilyEssential | /**
* The only CF this filter needs is given column family. So, it's the only essential column in
* whole scan. If filterIfMissing == false, all families are essential, because of possibility of
* skipping the rows without any data in filtered CF.
*/
@Override
public boolean isFamilyEssential(byte[] name) {
retur... | 3.68 |
framework_MultiSelectionModelImpl_fetchAllDescendants | /**
* Fetch all the descendants of the given parent item from the given data
* provider.
*
* @since 8.1
* @param parent
* the parent item to fetch descendants for
* @param dataProvider
* the data provider to fetch from
* @return the stream of all descendant items
*/
private Stream<T> fet... | 3.68 |
hbase_Scan_getFingerprint | /**
* Compile the table and column family (i.e. schema) information into a String. Useful for parsing
* and aggregation by debugging, logging, and administration tools.
*/
@Override
public Map<String, Object> getFingerprint() {
Map<String, Object> map = new HashMap<>();
List<String> families = new ArrayList<>();... | 3.68 |
flink_SplitFetcher_addSplits | /**
* Add splits to the split fetcher. This operation is asynchronous.
*
* @param splitsToAdd the splits to add.
*/
public void addSplits(List<SplitT> splitsToAdd) {
lock.lock();
try {
enqueueTaskUnsafe(new AddSplitsTask<>(splitReader, splitsToAdd, assignedSplits));
wakeUpUnsafe(true);
}... | 3.68 |
hudi_HoodieBackedTableMetadataWriter_initializeIfNeeded | /**
* Initialize the metadata table if needed.
*
* @param dataMetaClient - meta client for the data table
* @param inflightInstantTimestamp - timestamp of an instant in progress on the dataset
* @throws IOException on errors
*/
protected boolean initializeIfNeeded(HoodieTableMetaClient dataMetaClient,
... | 3.68 |
flink_FactoryUtil_validateWatermarkOptions | /**
* Validate watermark options from table options.
*
* @param factoryIdentifier identifier of table
* @param conf table options
*/
public static void validateWatermarkOptions(String factoryIdentifier, ReadableConfig conf) {
Optional<String> errMsgOptional = checkWatermarkOptions(conf);
if (errMsgOptional... | 3.68 |
dubbo_MergerFactory_getActualTypeArgument | /**
* get merger's actual type argument (same as return type)
* @param mergerCls
* @return
*/
private Class<?> getActualTypeArgument(Class<? extends Merger> mergerCls) {
Class<?> superClass = mergerCls;
while (superClass != Object.class) {
Type[] interfaceTypes = superClass.getGenericInterfaces();
... | 3.68 |
morf_SelectStatementBuilder_notDistinct | /**
* Disable DISTINCT. Although this is the default, it can be used
* to remove the DISTINCT behaviour on a copied statement.
*`
* @return this, for method chaining.
*/
public SelectStatementBuilder notDistinct() {
this.distinct = false;
return this;
} | 3.68 |
flink_CheckpointConfig_setCheckpointIntervalDuringBacklog | /**
* Sets the interval in which checkpoints are periodically scheduled during backlog.
*
* <p>This setting defines the base interval. Checkpoint triggering may be delayed by the
* settings {@link #setMaxConcurrentCheckpoints(int)} and {@link
* #setMinPauseBetweenCheckpoints(long)}.
*
* <p>If not explicitly conf... | 3.68 |
hadoop_ContentCounts_getSnapshotCount | // Get the number of snapshots
public long getSnapshotCount() {
return contents.get(Content.SNAPSHOT);
} | 3.68 |
framework_AbstractClientConnector_removeListener | /**
* <p>
* Removes one registered listener method. The given method owned by the
* given object will no longer be called when the specified events are
* generated by this component.
* </p>
*
* <p>
* This version of <code>removeListener</code> gets the name of the
* activation method as a parameter. The actual... | 3.68 |
hadoop_TypedBytesInput_readFloat | /**
* Reads the float following a <code>Type.FLOAT</code> code.
* @return the obtained float
* @throws IOException
*/
public float readFloat() throws IOException {
return in.readFloat();
} | 3.68 |
dubbo_Bytes_bytes2double | /**
* to long.
*
* @param b byte array.
* @param off offset.
* @return double.
*/
public static double bytes2double(byte[] b, int off) {
long j = ((b[off + 7] & 0xFFL) << 0)
+ ((b[off + 6] & 0xFFL) << 8)
+ ((b[off + 5] & 0xFFL) << 16)
+ ((b[off + 4] & 0xFFL) << 24)
... | 3.68 |
flink_KeyedStream_reduce | /**
* Applies a reduce transformation on the grouped data stream grouped on by the given key
* position. The {@link ReduceFunction} will receive input values based on the key value. Only
* input values with the same key will go to the same reducer.
*
* @param reducer The {@link ReduceFunction} that will be called ... | 3.68 |
framework_Window_close | /**
* Method that handles window closing (from UI).
*
* <p>
* By default, windows are removed from their respective UIs and thus
* visually closed on browser-side.
* </p>
*
* <p>
* To react to a window being closed (after it is closed), register a
* {@link CloseListener}.
* </p>
*/
public void close() {
... | 3.68 |
flink_FileSystem_getDefaultFsUri | /**
* Gets the default file system URI that is used for paths and file systems that do not specify
* and explicit scheme.
*
* <p>As an example, assume the default file system URI is set to {@code
* 'hdfs://someserver:9000/'}. A file path of {@code '/user/USERNAME/in.txt'} is interpreted as
* {@code 'hdfs://somese... | 3.68 |
hadoop_AllocateRequest_build | /**
* Return generated {@link AllocateRequest} object.
* @return {@link AllocateRequest}
*/
@Public
@Stable
public AllocateRequest build() {
return allocateRequest;
} | 3.68 |
querydsl_GeometryExpression_intersects | /**
* Returns 1 (TRUE) if this geometric object “spatially intersects” anotherGeometry.
*
* @param geometry other geometry
* @return true, if intersects
*/
public BooleanExpression intersects(Expression<? extends Geometry> geometry) {
return Expressions.booleanOperation(SpatialOps.INTERSECTS, mixin, geometry);... | 3.68 |
zxing_Decoder_correctErrors | /**
* <p>Given data and error-correction codewords received, possibly corrupted by errors, attempts to
* correct the errors in-place using Reed-Solomon error correction.</p>
*
* @param codewordBytes data and error correction codewords
* @param numDataCodewords number of codewords that are data bytes
* @return the... | 3.68 |
pulsar_FunctionRuntimeManager_getFunctionInstanceStats | /**
* Get stats of a function instance. If this worker is not running the function instance.
* @param tenant the tenant the function belongs to
* @param namespace the namespace the function belongs to
* @param functionName the function name
* @param instanceId the function instance id
* @return jsonObject contai... | 3.68 |
AreaShop_FileManager_getRegionNames | /**
* Get a list of names of all regions.
* @return A String list with all the names
*/
public List<String> getRegionNames() {
ArrayList<String> result = new ArrayList<>();
for(GeneralRegion region : getRegions()) {
result.add(region.getName());
}
return result;
} | 3.68 |
shardingsphere-elasticjob_ListenerNotifierManager_getInstance | /**
* Get singleton instance of ListenerNotifierManager.
* @return singleton instance of ListenerNotifierManager.
*/
public static ListenerNotifierManager getInstance() {
if (null == instance) {
synchronized (ListenerNotifierManager.class) {
if (null == instance) {
instance = ... | 3.68 |
hbase_Query_setIsolationLevel | /**
* Set the isolation level for this query. If the isolation level is set to READ_UNCOMMITTED, then
* this query will return data from committed and uncommitted transactions. If the isolation level
* is set to READ_COMMITTED, then this query will return data from committed transactions only. If
* a isolation leve... | 3.68 |
framework_InfoSection_equalsEither | /**
* Checks if the target value equals one of the reference values
*
* @param target
* The value to compare
* @param reference1
* A reference value
* @param reference2
* A reference value
* @return true if target equals one of the references, false otherwise
*/
private boolea... | 3.68 |
hudi_CompactionCommitSink_commitIfNecessary | /**
* Condition to commit: the commit buffer has equal size with the compaction plan operations
* and all the compact commit event {@link CompactionCommitEvent} has the same compaction instant time.
*
* @param instant Compaction commit instant time
* @param events Commit events ever received for the instant
*/
p... | 3.68 |
flink_FutureUtils_completedVoidFuture | /**
* Returns a completed future of type {@link Void}.
*
* @return a completed future of type {@link Void}
*/
public static CompletableFuture<Void> completedVoidFuture() {
return COMPLETED_VOID_FUTURE;
} | 3.68 |
framework_InMemoryDataProvider_addSortOrder | /**
* Adds a property and direction to the default sorting for this data
* provider. If no default sorting has been defined, then the provided sort
* order will be used as the default sorting. If a default sorting has been
* defined, then the provided sort order will be used to determine the
* ordering of items th... | 3.68 |
querydsl_JTSGeometryExpression_intersects | /**
* Returns 1 (TRUE) if this geometric object “spatially intersects” anotherGeometry.
*
* @param geometry other geometry
* @return true, if intersects
*/
public BooleanExpression intersects(Expression<? extends Geometry> geometry) {
return Expressions.booleanOperation(SpatialOps.INTERSECTS, mixin, geometry);... | 3.68 |
hbase_MetricsStochasticBalancer_balancerStatus | /**
* Updates the balancer status tag reported to JMX
*/
@Override
public void balancerStatus(boolean status) {
stochasticSource.updateBalancerStatus(status);
} | 3.68 |
morf_FieldFromSelectFirst_getSelectFirstStatement | /**
* @return the selectStatement
*/
public SelectFirstStatement getSelectFirstStatement() {
return selectFirstStatement;
} | 3.68 |
flink_BatchTask_closeUserCode | /**
* Closes the given stub using its {@link
* org.apache.flink.api.common.functions.RichFunction#close()} method. If the close call
* produces an exception, a new exception with a standard error message is created, using the
* encountered exception as its cause.
*
* @param stub The user code instance to be close... | 3.68 |
hbase_FilterBase_areSerializedFieldsEqual | /**
* Default implementation so that writers of custom filters aren't forced to implement.
* @return true if and only if the fields of the filter that are serialized are equal to the
* corresponding fields in other. Used for testing.
*/
@Override
boolean areSerializedFieldsEqual(Filter other) {
return tru... | 3.68 |
shardingsphere-elasticjob_JobAPIFactory_createJobOperateAPI | /**
* Create job operate API.
*
* @param connectString registry center connect string
* @param namespace registry center namespace
* @param digest registry center digest
* @return job operate API
*/
public static JobOperateAPI createJobOperateAPI(final String connectString, final String namespace, final String d... | 3.68 |
framework_FieldGroup_getFieldFactory | /**
* Gets the field factory for the {@link FieldGroup}. The field factory is
* only used when {@link FieldGroup} creates a new field.
*
* @return The field factory in use
*
*/
public FieldGroupFieldFactory getFieldFactory() {
return fieldFactory;
} | 3.68 |
flink_ParquetAvroWriters_forGenericRecord | /**
* Creates a ParquetWriterFactory that accepts and writes Avro generic types. The Parquet
* writers will use the given schema to build and write the columnar data.
*
* @param schema The schema of the generic type.
*/
public static ParquetWriterFactory<GenericRecord> forGenericRecord(Schema schema) {
return ... | 3.68 |
pulsar_LongHierarchicalLedgerRangeIterator_getChildrenAt | /**
* Returns all children with path as a parent. If path is non-existent,
* returns an empty list anyway (after all, there are no children there).
* Maps all exceptions (other than NoNode) to IOException in keeping with
* LedgerRangeIterator.
*
* @param path
* @return Iterator into set of all children with pat... | 3.68 |
morf_InsertStatement_getHints | /**
* @return all hints in the order they were declared.
*/
public List<Hint> getHints() {
return hints;
} | 3.68 |
hbase_Bytes_incrementBytes | /**
* Bytewise binary increment/deincrement of long contained in byte array on given amount.
* @param value - array of bytes containing long (length <= SIZEOF_LONG)
* @param amount value will be incremented on (deincremented if negative)
* @return array of bytes containing incremented long (length == SIZEOF_LON... | 3.68 |
hbase_TableSplit_readFields | /**
* Reads the values of each field.
* @param in The input to read from.
* @throws IOException When reading the input fails.
*/
@Override
public void readFields(DataInput in) throws IOException {
Version version = Version.UNVERSIONED;
// TableSplit was not versioned in the beginning.
// In order to introduce... | 3.68 |
pulsar_AuthenticationProviderOpenID_authenticateTokenAsync | /**
* Authenticate the parameterized {@link AuthenticationDataSource} and return the decoded JWT.
* @param authData - the authData containing the token.
* @return a completed future with the decoded JWT, if the JWT is authenticated. Otherwise, a failed future.
*/
CompletableFuture<DecodedJWT> authenticateTokenAsync... | 3.68 |
hbase_ColumnFamilyDescriptorBuilder_setStoragePolicy | /**
* Set the storage policy for use with this family
* @param policy the policy to set, valid setting includes: <i>"LAZY_PERSIST"</i>,
* <i>"ALL_SSD"</i>, <i>"ONE_SSD"</i>, <i>"HOT"</i>, <i>"WARM"</i>, <i>"COLD"</i>
* @return this (for chained invocation)
*/
public ModifyableColumnFamilyDescriptor s... | 3.68 |
flink_BuiltInSqlFunction_internal | /** @see BuiltInFunctionDefinition.Builder#internal() */
public Builder internal() {
this.isInternal = true;
return this;
} | 3.68 |
hbase_NettyHBaseRpcConnectionHeaderHandler_setupCryptoAESHandler | /**
* Remove handlers for sasl encryption and add handlers for Crypto AES encryption
*/
private void setupCryptoAESHandler(ChannelPipeline p, CryptoAES cryptoAES) {
p.replace(SaslWrapHandler.class, null, new SaslWrapHandler(cryptoAES::wrap));
p.replace(SaslUnwrapHandler.class, null, new SaslUnwrapHandler(cryptoAE... | 3.68 |
hadoop_ECPolicyLoader_loadLayoutVersion | /**
* Load layoutVersion from root element in the XML configuration file.
* @param root root element
* @return layout version
*/
private int loadLayoutVersion(Element root) {
int layoutVersion;
Text text = (Text) root.getElementsByTagName("layoutversion")
.item(0).getFirstChild();
if (text != null) {
... | 3.68 |
hbase_ColumnFamilyDescriptorBuilder_setCompactionCompressionType | /**
* Compression types supported in hbase. LZO is not bundled as part of the hbase distribution.
* See See <a href="http://hbase.apache.org/book.html#lzo.compression">LZO Compression</a> for
* how to enable it.
* @param type Compression type setting.
* @return this (for chained invocation)
*/
public ModifyableCo... | 3.68 |
hbase_WALKeyImpl_addClusterId | /**
* Marks that the cluster with the given clusterId has consumed the change
*/
public void addClusterId(UUID clusterId) {
if (!clusterIds.contains(clusterId)) {
clusterIds.add(clusterId);
}
} | 3.68 |
hbase_AtomicUtils_updateMin | /**
* Updates a AtomicLong which is supposed to maintain the minimum values. This method is not
* synchronized but is thread-safe.
*/
public static void updateMin(AtomicLong min, long value) {
while (true) {
long cur = min.get();
if (value >= cur) {
break;
}
if (min.compareAndSet(cur, value)... | 3.68 |
framework_StringDecorator_group | /**
* Groups a string by surrounding it in parenthesis.
*
* @param str
* the string to group
* @return the grouped string
*/
public String group(String str) {
return "(" + str + ")";
} | 3.68 |
flink_OrcShim_createShim | /** Create shim from hive version. */
static OrcShim<VectorizedRowBatch> createShim(String hiveVersion) {
if (hiveVersion.startsWith("2.0")) {
return new OrcShimV200();
} else if (hiveVersion.startsWith("2.1")) {
return new OrcShimV210();
} else if (hiveVersion.startsWith("2.2")
... | 3.68 |
flink_MapValue_remove | /*
* (non-Javadoc)
* @see java.util.Map#remove(java.lang.Object)
*/
@Override
public V remove(final Object key) {
return this.map.remove(key);
} | 3.68 |
hmily_HashedWheelTimer_processCancelledTasks | /**
* 流程任务取消;从取消队列中获取任务。并删除.
*/
private void processCancelledTasks() {
for (;;) {
HashedWheelTimeout timeout = cancelledTimeouts.poll();
if (timeout == null) {
// all processed
break;
}
try {
timeout.remove();
} catch (Throwable t) {
... | 3.68 |
hudi_OrcUtils_readAvroRecords | /**
* NOTE: This literally reads the entire file contents, thus should be used with caution.
*/
@Override
public List<GenericRecord> readAvroRecords(Configuration configuration, Path filePath, Schema avroSchema) {
List<GenericRecord> records = new ArrayList<>();
try (Reader reader = OrcFile.createReader(filePath,... | 3.68 |
hadoop_AvailableSpaceResolver_getSubclusterInfo | /**
* Get the mapping from NamespaceId to subcluster space info. It gets this
* mapping from the subclusters through expensive calls (e.g., RPC) and uses
* caching to avoid too many calls. The cache might be updated asynchronously
* to reduce latency.
*
* @return NamespaceId to {@link SubclusterAvailableSpace}.
... | 3.68 |
hadoop_BalanceProcedureScheduler_submit | /**
* Submit the job.
*/
public synchronized void submit(BalanceJob job) throws IOException {
if (!running.get()) {
throw new IOException("Scheduler is shutdown.");
}
String jobId = allocateJobId();
job.setId(jobId);
job.setScheduler(this);
journal.saveJob(job);
jobSet.put(job, job);
runningQueue.... | 3.68 |
framework_VColorPickerGrid_updateGrid | /**
* Updates the row and column count and creates a new grid based on them.
* The new grid replaces the old grid if one existed.
* <p>
* For internal use only. May be renamed or removed in a future release.
*
* @param rowCount
* how many rows the grid should have
* @param columnCount
* h... | 3.68 |
hudi_BaseHoodieQueueBasedExecutor_execute | /**
* Main API to run both production and consumption.
*/
@Override
public E execute() {
try {
checkState(this.consumer.isPresent());
setUp();
// Start consuming/producing asynchronously
this.consumingFuture = startConsumingAsync();
this.producingFuture = startProducingAsync();
// NOTE: To ... | 3.68 |
flink_FromJarEntryClassInformationProvider_createFromPythonJar | /**
* Creates a {@code FromJarEntryClassInformationProvider} for a job implemented in Python.
*
* @return A {@code FromJarEntryClassInformationProvider} for a job implemented in Python
*/
public static FromJarEntryClassInformationProvider createFromPythonJar() {
return new FromJarEntryClassInformationProvider(
... | 3.68 |
hbase_HFileBlockIndex_locateNonRootIndexEntry | /**
* Search for one key using the secondary index in a non-root block. In case of success,
* positions the provided buffer at the entry of interest, where the file offset and the
* on-disk-size can be read. a non-root block without header. Initial position does not matter.
* the byte array containing the key
* @r... | 3.68 |
framework_VAbstractCalendarPanel_onMouseDown | /*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.dom.client.MouseDownHandler#onMouseDown(com.google
* .gwt.event.dom.client.MouseDownEvent)
*/
@SuppressWarnings("unchecked")
@Override
public void onMouseDown(MouseDownEvent event) {
// Click-n-hold the left mouse button for fast-forward or fast-rewind.
/... | 3.68 |
flink_RpcUtils_terminateRpcEndpoint | /**
* Shuts the given {@link RpcEndpoint}s down and awaits their termination.
*
* @param rpcEndpoints to terminate
* @throws ExecutionException if a problem occurred
* @throws InterruptedException if the operation has been interrupted
*/
@VisibleForTesting
public static void terminateRpcEndpoint(RpcEndpoint... rp... | 3.68 |
framework_AbstractSelect_getItemIcon | /**
* Gets the item icon.
*
* @param itemId
* the id of the item to be assigned an icon.
* @return the icon for the item or null, if not specified.
*/
public Resource getItemIcon(Object itemId) {
final Resource explicit = itemIcons.get(itemId);
if (explicit != null) {
return explicit;
... | 3.68 |
framework_InMemoryDataProviderHelpers_createEqualsFilter | /**
* Creates a predicate that compares equality of the given required value to
* the value the given value provider obtains.
*
* @param valueProvider
* the value provider to use
* @param requiredValue
* the required value
* @return the created predicate
*/
public static <T, V> Serializab... | 3.68 |
dubbo_StubServiceDescriptor_getMethod | /**
* Does not use Optional as return type to avoid potential performance decrease.
*
* @param methodName
* @param paramTypes
* @return
*/
public MethodDescriptor getMethod(String methodName, Class<?>[] paramTypes) {
List<MethodDescriptor> methodModels = methods.get(methodName);
if (CollectionUtils.isNotE... | 3.68 |
hbase_MasterFileSystem_getRootDir | /** Returns HBase root dir. */
public Path getRootDir() {
return this.rootdir;
} | 3.68 |
hadoop_TimelineEntityReaderFactory_createEntityTypeReader | /**
* Creates a timeline entity type reader that will read all available entity
* types within the specified context.
*
* @param context Reader context which defines the scope in which query has to
* be made. Limited to application level only.
* @return an <cite>EntityTypeReader</cite> object
*/
p... | 3.68 |
hbase_AsyncTable_incrementColumnValue | /**
* Atomically increments a column value. If the column value already exists and is not a
* big-endian long, this could throw an exception. If the column value does not yet exist it is
* initialized to <code>amount</code> and written to the specified column.
* <p>
* Setting durability to {@link Durability#SKIP_W... | 3.68 |
hudi_AbstractTableFileSystemView_fetchAllBaseFiles | /**
* Default implementation for fetching all base-files for a partition.
*
* @param partitionPath partition-path
*/
Stream<HoodieBaseFile> fetchAllBaseFiles(String partitionPath) {
return fetchAllStoredFileGroups(partitionPath).flatMap(HoodieFileGroup::getAllBaseFiles);
} | 3.68 |
flink_JoinOperator_projectTuple3 | /**
* Projects a pair of joined elements to a {@link Tuple} with the previously selected
* fields. Requires the classes of the fields of the resulting tuples.
*
* @return The projected data set.
* @see Tuple
* @see DataSet
*/
public <T0, T1, T2> ProjectJoin<I1, I2, Tuple3<T0, T1, T2>> projectTuple3() {
TypeI... | 3.68 |
hadoop_TimelinePutResponse_setErrors | /**
* Set the list to the given list of {@link TimelinePutError} instances
*
* @param errors
* a list of {@link TimelinePutError} instances
*/
public void setErrors(List<TimelinePutError> errors) {
this.errors.clear();
this.errors.addAll(errors);
} | 3.68 |
hbase_HFileArchiver_archiveRegion | /**
* Remove an entire region from the table directory via archiving the region's hfiles.
* @param fs {@link FileSystem} from which to remove the region
* @param rootdir {@link Path} to the root directory where hbase files are stored (for building
* the archive path)
* @param tableDir {@... | 3.68 |
flink_ResultPartition_onSubpartitionAllDataProcessed | /**
* The subpartition notifies that the corresponding downstream task have processed all the user
* records.
*
* @see EndOfData
* @param subpartition The index of the subpartition sending the notification.
*/
public void onSubpartitionAllDataProcessed(int subpartition) {} | 3.68 |
hadoop_FSDirAppendOp_computeQuotaDeltaForUCBlock | /** Compute quota change for converting a complete block to a UC block. */
private static QuotaCounts computeQuotaDeltaForUCBlock(FSNamesystem fsn,
INodeFile file) {
final QuotaCounts delta = new QuotaCounts.Builder().build();
final BlockInfo lastBlock = file.getLastBlock();
if (lastBlock != null) {
final... | 3.68 |
hbase_GssSaslServerAuthenticationProvider_handle | /** {@inheritDoc} */
@Override
public void handle(Callback[] callbacks) throws UnsupportedCallbackException {
AuthorizeCallback ac = null;
for (Callback callback : callbacks) {
if (callback instanceof AuthorizeCallback) {
ac = (AuthorizeCallback) callback;
} else {
throw new UnsupportedCallbackE... | 3.68 |
hbase_MetricsIO_getInstance | /**
* Get a static instance for the MetricsIO so that accessors access the same instance. We want to
* lazy initialize so that correct process name is in place. See HBASE-27966 for more details.
*/
public static MetricsIO getInstance() {
if (instance == null) {
synchronized (MetricsIO.class) {
if (instan... | 3.68 |
framework_CalendarTargetDetails_getTargetCalendar | /**
* @return the {@link Calendar} instance which was the target of the drop
*/
public Calendar getTargetCalendar() {
return (Calendar) getTarget();
} | 3.68 |
hadoop_CommonAuditContext_getGlobalContextEntry | /**
* Get a global entry.
* @param key key
* @return value or null
*/
public static String getGlobalContextEntry(String key) {
return GLOBAL_CONTEXT_MAP.get(key);
} | 3.68 |
hudi_DagUtils_convertDagToYaml | /**
* Converts {@link WorkflowDag} to a YAML representation.
*/
public static String convertDagToYaml(WorkflowDag dag) throws IOException {
final ObjectMapper yamlWriter = new ObjectMapper(new YAMLFactory().disable(Feature.WRITE_DOC_START_MARKER)
.enable(Feature.MINIMIZE_QUOTES).enable(JsonParser.Feature.ALLO... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.