name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hudi_BulkInsertWriterHelper_getInstantTime | /**
* Returns the write instant time.
*/
public String getInstantTime() {
return this.instantTime;
} | 3.68 |
hadoop_DeSelectFields_obtainType | /**
* Obtain the <code>DeSelectType</code> by the literals given behind
* <code>deSelects</code> in URL.
* <br> e.g: deSelects="resourceRequests"
* @param literals e.g: resourceRequests
* @return <code>DeSelectType</code> e.g: DeSelectType.RESOURCE_REQUESTS
*/
public static DeSelectType obtainType(String literals... | 3.68 |
flink_Costs_addCpuCost | /**
* Adds the given CPU cost to the current CPU cost for this Costs object.
*
* @param cost The CPU cost to add.
*/
public void addCpuCost(double cost) {
this.cpuCost = (this.cpuCost < 0 || cost < 0) ? UNKNOWN : this.cpuCost + cost;
} | 3.68 |
hbase_ScannerModel_setBatch | /**
* @param batch the number of cells to return in batch
*/
public void setBatch(int batch) {
this.batch = batch;
} | 3.68 |
hbase_MemStoreFlusher_interruptIfNecessary | /**
* Only interrupt once it's done with a run through the work loop.
*/
void interruptIfNecessary() {
lock.writeLock().lock();
try {
for (FlushHandler flushHandler : flushHandlers) {
if (flushHandler != null) {
flushHandler.interrupt();
}
}
} finally {
lock.writeLock().unlock();... | 3.68 |
morf_AddColumn_accept | /**
* @see org.alfasoftware.morf.upgrade.SchemaChange#accept(org.alfasoftware.morf.upgrade.SchemaChangeVisitor)
*/
@Override
public void accept(SchemaChangeVisitor visitor) {
visitor.visit(this);
} | 3.68 |
hibernate-validator_ServiceLoaderBasedConstraintMappingContributor_run | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.68 |
graphhopper_InstructionsOutgoingEdges_outgoingEdgesAreSlowerByFactor | /**
* Checks if the outgoing edges are slower by the provided factor. If they are, this indicates, that we are staying
* on the prominent street that one would follow anyway.
*/
public boolean outgoingEdgesAreSlowerByFactor(double factor) {
double tmpSpeed = getSpeed(currentEdge);
double pathSpeed = getSpeed... | 3.68 |
morf_DatabaseMetaDataProvider_readIndexName | /**
* Retrieves index name from a result set.
*
* @param indexResultSet Result set to be read.
* @return Name of the index.
* @throws SQLException Upon errors.
*/
protected RealName readIndexName(ResultSet indexResultSet) throws SQLException {
String indexName = indexResultSet.getString(INDEX_NAME);
return cr... | 3.68 |
flink_ZooKeeperStateHandleStore_normalizePath | /**
* Makes sure that every path starts with a "/".
*
* @param path Path to normalize
* @return Normalized path such that it starts with a "/"
*/
private static String normalizePath(String path) {
if (path.startsWith("/")) {
return path;
} else {
return '/' + path;
}
} | 3.68 |
hbase_HMaster_getNamespaces | /**
* Get all Namespaces
* @return All Namespace descriptors
*/
List<NamespaceDescriptor> getNamespaces() throws IOException {
checkInitialized();
final List<NamespaceDescriptor> nsds = new ArrayList<>();
if (cpHost != null) {
cpHost.preListNamespaceDescriptors(nsds);
}
nsds.addAll(this.clusterSchemaSe... | 3.68 |
framework_VCaption_setCaptionText | /**
* Sets the text of the given widget to the caption found in the state.
* <p>
* Uses {@link AbstractComponentState#captionAsHtml} to determine whether to
* set the caption as html or plain text
*
* @since 7.4
* @param widget
* the target widget
* @param state
* the state from which to... | 3.68 |
flink_BlobClient_putInputStream | /**
* Uploads data from the given input stream to the BLOB server.
*
* @param jobId the ID of the job the BLOB belongs to (or <tt>null</tt> if job-unrelated)
* @param inputStream the input stream to read the data from
* @param blobType whether the BLOB should become permanent or transient
* @return the computed B... | 3.68 |
hbase_ProcedureExecutor_getWorkerThreadCount | /** Returns the current number of worker threads. */
public int getWorkerThreadCount() {
return workerThreads.size();
} | 3.68 |
hadoop_DiskBalancerException_getResult | /**
* Returns the result.
* @return int
*/
public Result getResult() {
return result;
} | 3.68 |
hudi_BinaryUtil_toBytes | /**
* Copies {@link ByteBuffer} into allocated {@code byte[]} array
*/
public static byte[] toBytes(ByteBuffer buffer) {
byte[] bytes = new byte[buffer.remaining()];
buffer.get(bytes);
return bytes;
} | 3.68 |
hadoop_ConfigRedactor_redactXml | /**
* Given a key / value pair, decides whether or not to redact and returns
* either the original value or text indicating it has been redacted.
*
* @param key param key.
* @param value param value, will return if conditions permit.
* @return Original value, or text indicating it has been redacted
*/
public Str... | 3.68 |
hadoop_ServiceLauncher_createGenericOptionsParser | /**
* Override point: create a generic options parser or subclass thereof.
* @param conf Hadoop configuration
* @param argArray array of arguments
* @return a generic options parser to parse the arguments
* @throws IOException on any failure
*/
protected GenericOptionsParser createGenericOptionsParser(Configurati... | 3.68 |
flink_ExecEdge_translateToPlan | /**
* Translates this edge into a Flink operator.
*
* @param planner The {@link Planner} of the translated Table.
*/
public Transformation<?> translateToPlan(Planner planner) {
return source.translateToPlan(planner);
} | 3.68 |
zxing_HighLevelEncoder_updateStateForChar | // Return a set of states that represent the possible ways of updating this
// state for the next character. The resulting set of states are added to
// the "result" list.
private void updateStateForChar(State state, int index, Collection<State> result) {
char ch = (char) (text[index] & 0xFF);
boolean charInCurren... | 3.68 |
hbase_MetricSampleQuantiles_getCount | /**
* Returns the number of items that the estimator has processed
* @return count total number of items processed
*/
synchronized public long getCount() {
return count;
} | 3.68 |
dubbo_TypeDefinition_formatType | /**
* Format the {@link String} presenting Java type
*
* @param type the String presenting type
* @return new String presenting Java type after be formatted
* @since 2.7.9
*/
public static String formatType(String type) {
if (isGenericType(type)) {
return formatGenericType(type);
}
return type... | 3.68 |
hmily_AggregateBinder_getEnv | /**
* Gets env.
*
* @return the env
*/
Binder.Env getEnv() {
return env;
} | 3.68 |
framework_TypeDataStore_getOnStateChangeMethods | /**
* Gets data for all methods annotated with {@link OnStateChange} in the
* given connector type.
*
* @since 7.2
* @param type
* the connector type
* @return a map of state property names to handler method data
*/
public static FastStringMap<JsArrayObject<OnStateChangeMethod>> getOnStateChangeMetho... | 3.68 |
flink_KvStateLocation_getKvStateID | /**
* Returns the registered KvStateID for the key group index or <code>null</code> if none is
* registered yet.
*
* @param keyGroupIndex Key group index to get ID for.
* @return KvStateID for the key group index or <code>null</code> if none is registered yet
* @throws IndexOutOfBoundsException If key group index... | 3.68 |
hmily_GrpcHmilyClient_syncInvoke | /**
* grpc sync.
*
* @param <T> T
* @param clazz clazz
* @param abstractStub AbstractStub
* @param method String
* @param param Object
* @return t T
*/
public <T> T syncInvoke(final AbstractStub abstractStub, final String method, final Object param, final Class<T> clazz) {
GrpcHmilyContext.getHmilyFailCont... | 3.68 |
flink_MemoryLogger_getDirectMemoryStatsAsString | /**
* Returns a String with the <strong>direct</strong> memory footprint.
*
* <p>These stats are not part of the other memory beans.
*
* @param bufferPoolMxBean The direct buffer pool bean or <code>null</code> if none available.
* @return A string with the count, total capacity, and used direct memory.
*/
public... | 3.68 |
framework_AbstractClientConnector_fireEvent | /**
* Sends the event to all listeners.
*
* @param event
* the Event to be sent to all listeners.
*/
protected void fireEvent(EventObject event) {
if (eventRouter != null) {
eventRouter.fireEvent(event);
}
} | 3.68 |
framework_ComputedStyle_getPaddingHeight | /**
* Returns the sum of the top and bottom padding.
*
* @since 7.5.3
* @return the sum of the top and bottom padding
*/
public double getPaddingHeight() {
double paddingHeight = getDoubleProperty("paddingTop");
paddingHeight += getDoubleProperty("paddingBottom");
return paddingHeight;
} | 3.68 |
hadoop_NMTokenCache_getSingleton | /**
* Returns the singleton NM token cache.
*
* @return the singleton NM token cache.
*/
public static NMTokenCache getSingleton() {
return NM_TOKEN_CACHE;
} | 3.68 |
hudi_HoodieFlinkCopyOnWriteTable_bulkInsertPrepped | /**
* Bulk inserts the given prepared records into the Hoodie table, at the supplied instantTime.
*
* <p>This implementation requires that the input records are already tagged, and de-duped if needed.
*
* <p>Specifies the write handle explicitly in order to have fine-grained control with
* the underneath file.
*... | 3.68 |
flink_YarnClusterDescriptor_deployInternal | /**
* This method will block until the ApplicationMaster/JobManager have been deployed on YARN.
*
* @param clusterSpecification Initial cluster specification for the Flink cluster to be
* deployed
* @param applicationName name of the Yarn application to start
* @param yarnClusterEntrypoint Class name of the Y... | 3.68 |
morf_DataSetAdapter_open | /**
* @see org.alfasoftware.morf.dataset.DataSetConsumer#open()
*/
@Override
public void open() {
consumer.open();
} | 3.68 |
flink_TemporalRowTimeJoinOperator_cleanupExpiredVersionInState | /**
* Removes all expired version in the versioned table's state according to current watermark.
*/
private void cleanupExpiredVersionInState(long currentWatermark, List<RowData> rightRowsSorted)
throws Exception {
int i = 0;
int indexToKeep = firstIndexToKeep(currentWatermark, rightRowsSorted);
/... | 3.68 |
hbase_RegionPlacementMaintainer_updateAssignmentPlanToRegionServers | /**
* Update the assignment plan to all the region servers
*/
private void updateAssignmentPlanToRegionServers(FavoredNodesPlan plan) throws IOException {
LOG.info("Start to update the region servers with the new assignment plan");
// Get the region to region server map
Map<ServerName, List<RegionInfo>> current... | 3.68 |
flink_TestSignalHandler_register | /** Register some signal handlers. */
public static void register() {
synchronized (TestSignalHandler.class) {
if (registered) {
return;
}
registered = true;
final String[] signals =
System.getProperty("os.name").startsWith("Windows")
... | 3.68 |
flink_DeletePushDownUtils_getResolvedFilterExpressions | /**
* Get the resolved filter expressions from the {@code WHERE} clause in DELETE statement, return
* Optional.empty() if {@code WHERE} clause contains sub-query.
*/
public static Optional<List<ResolvedExpression>> getResolvedFilterExpressions(
LogicalTableModify tableModify) {
FlinkContext context = Sho... | 3.68 |
hadoop_Chain_getReducer | /**
* Returns the Reducer instance in the chain.
*
* @return the Reducer instance in the chain or NULL if none.
*/
Reducer<?, ?, ?, ?> getReducer() {
return reducer;
} | 3.68 |
flink_PythonConfigUtil_processSideOutput | /**
* Process {@link SideOutputTransformation}s, set the {@link OutputTag}s into the Python
* corresponding operator to make it aware of the {@link OutputTag}s.
*/
private static void processSideOutput(List<Transformation<?>> transformations) {
final Set<Transformation<?>> visitedTransforms = Sets.newIdentityHas... | 3.68 |
hbase_CompactionConfiguration_getMaxFilesToCompact | /** Returns upper bound on number of files to be included in minor compactions */
public int getMaxFilesToCompact() {
return maxFilesToCompact;
} | 3.68 |
hbase_Scan_getReadType | /** Returns the read type for this scan */
public ReadType getReadType() {
return readType;
} | 3.68 |
hudi_Pair_hashCode | /**
* <p>
* Returns a suitable hash code. The hash code follows the definition in {@code Map.Entry}.
* </p>
*
* @return the hash code
*/
@Override
public int hashCode() {
// see Map.Entry API specification
return (getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() == null ? 0 : getValue().hashCode());
... | 3.68 |
pulsar_ObjectMapperFactory_getThreadLocal | /**
* This method is deprecated. Use {@link #getMapper()} and {@link MapperReference#getObjectMapper()}
*/
@Deprecated
public static ObjectMapper getThreadLocal() {
return getMapper().getObjectMapper();
} | 3.68 |
hadoop_BlockData_getBlockNumber | /**
* Gets the id of the block that contains the given absolute offset.
* @param offset the absolute offset to check.
* @return the id of the block that contains the given absolute offset.
* @throws IllegalArgumentException if offset is invalid.
*/
public int getBlockNumber(long offset) {
throwIfInvalidOffset(of... | 3.68 |
incubator-hugegraph-toolchain_SplicingIdGenerator_concat | /**
* Concat multiple ids into one composite id with IDS_SPLITOR
*
* @param ids the string id values to be contacted
* @return contacted string value
*/
public static String concat(String... ids) {
// NOTE: must support string id when using this method
return IdUtil.escape(IDS_SPLITOR, ESCAPE, ids);
} | 3.68 |
flink_HandlerUtils_sendResponse | /**
* Sends the given response and status code to the given channel.
*
* @param channelHandlerContext identifying the open channel
* @param keepAlive If the connection should be kept alive.
* @param message which should be sent
* @param statusCode of the message to send
* @param headers additional header values
... | 3.68 |
hadoop_EditLogBackupInputStream_length | /**
* Number of bytes read from the stream so far.
*/
int length() {
return count;
} | 3.68 |
flink_CheckpointStatsCounts_getNumberOfFailedCheckpoints | /**
* Returns the number of failed checkpoints.
*
* @return Number of failed checkpoints.
*/
public long getNumberOfFailedCheckpoints() {
return numFailedCheckpoints;
} | 3.68 |
hadoop_ManifestSuccessData_serializer | /**
* Get a JSON serializer for this class.
* @return a serializer.
*/
public static JsonSerialization<ManifestSuccessData> serializer() {
return new JsonSerialization<>(ManifestSuccessData.class, false, true);
} | 3.68 |
hbase_HFileCleaner_deleteFile | /**
* Construct an {@link HFileDeleteTask} for each file to delete and add into the correct queue
* @param file the file to delete
* @return HFileDeleteTask to track progress
*/
private HFileDeleteTask deleteFile(FileStatus file) {
HFileDeleteTask task = new HFileDeleteTask(file, cleanerThreadTimeoutMsec);
bool... | 3.68 |
hmily_AbstractHmilySQLParserExecutor_generateHmilyDeleteStatement | /**
* Generate Hmily delete statement.
*
* @param deleteStatement delete statement
* @param hmilyDeleteStatement hmily delete statement
* @return hmily delete statement
*/
public HmilyDeleteStatement generateHmilyDeleteStatement(final DeleteStatement deleteStatement, final HmilyDeleteStatement hmilyDeleteStatemen... | 3.68 |
hbase_CatalogFamilyFormat_getTableState | /**
* Decode table state from META Result. Should contain cell from HConstants.TABLE_FAMILY
* @return null if not found
*/
@Nullable
public static TableState getTableState(Result r) throws IOException {
Cell cell = r.getColumnLatestCell(HConstants.TABLE_FAMILY, HConstants.TABLE_STATE_QUALIFIER);
if (cell == null... | 3.68 |
hadoop_HdfsNamedFileStatus_getStoragePolicy | /** @return the storage policy id */
@Override
public byte getStoragePolicy() {
return storagePolicy;
} | 3.68 |
hadoop_StateStoreMetrics_setCacheSize | /**
* Set the size of the cache for a State Store interface.
*
* @param name Name of the record to cache.
* @param size Number of records.
*/
public void setCacheSize(String name, int size) {
String counterName = "Cache" + name + "Size";
MutableGaugeInt counter = cacheSizes.get(counterName);
if (counter == n... | 3.68 |
morf_Join_deepCopy | /**
* @see org.alfasoftware.morf.util.DeepCopyableWithTransformation#deepCopy(org.alfasoftware.morf.util.DeepCopyTransformation)
*/
@Override
public Builder<Join> deepCopy(DeepCopyTransformation transformer) {
return TempTransitionalBuilderWrapper.wrapper(new Join(this,transformer));
} | 3.68 |
flink_MutableHashTable_spillPartition | /**
* Selects a partition and spills it. The number of the spilled partition is returned.
*
* @return The number of the spilled partition.
*/
protected int spillPartition() throws IOException {
// find the largest partition
ArrayList<HashPartition<BT, PT>> partitions = this.partitionsBeingBuilt;
int lar... | 3.68 |
hadoop_ScriptBasedNodeLabelsProvider_serviceInit | /*
* Method which initializes the values for the script path and interval time.
*/
@Override
protected void serviceInit(Configuration conf) throws Exception {
String nodeLabelsScriptPath =
conf.get(YarnConfiguration.NM_SCRIPT_BASED_NODE_LABELS_PROVIDER_PATH);
long scriptTimeout =
conf.getLong(YarnConf... | 3.68 |
hadoop_AbfsDelegationTokenManager_getDelegationToken | /**
* Get a delegation token by invoking
* {@link CustomDelegationTokenManager#getDelegationToken(String)}.
* If the token returned already has a Kind; that is used.
* If not, then the token kind is set to
* {@link AbfsDelegationTokenIdentifier#TOKEN_KIND}, which implicitly
* resets any token renewer class.
* @p... | 3.68 |
hadoop_OBSDataBlocks_getOwner | /**
* Owner.
*
* @return obsFileSystem instance
*/
protected OBSFileSystem getOwner() {
return owner;
} | 3.68 |
dubbo_ProviderConfig_setDispather | /**
* typo, switch to use {@link #getDispatcher()}
*
* @deprecated {@link #setDispatcher(String)}
*/
@Deprecated
public void setDispather(String dispather) {
setDispatcher(dispather);
} | 3.68 |
pulsar_BrokerInterceptor_onMessagePublish | /**
* Intercept message when broker receive a send request.
*
* @param headersAndPayload entry's header and payload
* @param publishContext Publish Context
*/
default void onMessagePublish(Producer producer,
ByteBuf headersAndPayload,
Topic.PublishContext... | 3.68 |
framework_Potus_setFirstName | /**
* @param firstName
* the firstName to set
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
} | 3.68 |
querydsl_PathBuilder_get | /**
* Create a new Time typed path
*
* @param <A>
* @param path existing path
* @return property path
*/
@SuppressWarnings("unchecked")
public <A extends Comparable<?>> TimePath<A> get(TimePath<A> path) {
TimePath<A> newPath = getTime(toString(path), (Class<A>) path.getType());
return addMetadataOf(newPat... | 3.68 |
hadoop_BlockManagerParameters_getFuturePool | /**
* @return The Executor future pool to perform async prefetch tasks.
*/
public ExecutorServiceFuturePool getFuturePool() {
return futurePool;
} | 3.68 |
hadoop_ItemInfo_isDir | /**
* Returns true if the tracking path is a directory, false otherwise.
*/
public boolean isDir() {
return !(startPathId == fileId);
} | 3.68 |
hbase_HFileReaderImpl_positionThisBlockBuffer | /**
* Set the position on current backing blockBuffer.
*/
private void positionThisBlockBuffer() {
try {
blockBuffer.skip(getCurCellSerializedSize());
} catch (IllegalArgumentException e) {
LOG.error("Current pos = " + blockBuffer.position() + "; currKeyLen = " + currKeyLen
+ "; currValLen = " + cur... | 3.68 |
hbase_KeyValue_getKeyLength | /** Returns Length of key portion. */
public int getKeyLength() {
return Bytes.toInt(this.bytes, this.offset);
} | 3.68 |
flink_CoGroupOperator_where | /**
* Continues a CoGroup transformation and defines a {@link KeySelector} function for the
* first co-grouped {@link DataSet}.
*
* <p>The KeySelector function is called for each element of the first DataSet and extracts
* a single key value on which the DataSet is grouped.
*
* @param keyExtractor The KeySelecto... | 3.68 |
morf_MySqlDialect_renameIndexStatements | /**
* @see org.alfasoftware.morf.jdbc.SqlDialect#renameIndexStatements(org.alfasoftware.morf.metadata.Table,
* java.lang.String, java.lang.String)
*/
@Override
public Collection<String> renameIndexStatements(final Table table, final String fromIndexName, final String toIndexName) {
Index newIndex, existingInd... | 3.68 |
hadoop_RpcProgram_unregister | /**
* Unregister this program with the local portmapper.
* @param transport transport layer for port map
* @param boundPort port number of bounded RPC program
*/
public void unregister(int transport, int boundPort) {
if (boundPort != port) {
LOG.info("The bound port is " + boundPort
+ ", different wit... | 3.68 |
flink_PartialCachingLookupProvider_of | /**
* Build a {@link PartialCachingLookupProvider} from the specified {@link LookupFunction} and
* {@link LookupCache}.
*/
static PartialCachingLookupProvider of(LookupFunction lookupFunction, LookupCache cache) {
return new PartialCachingLookupProvider() {
@Override
public LookupCache getCache(... | 3.68 |
hadoop_VolumeManagerImpl_initCsiAdaptorCache | // Init the CSI adaptor cache according to the configuration.
// user only needs to configure a list of adaptor addresses,
// this method extracts each address and init an adaptor client,
// then proceed with a hand-shake by calling adaptor's getPluginInfo
// method to retrieve the driver info. If the driver can be res... | 3.68 |
flink_UserDefinedFunctionHelper_validateInstantiation | /** Checks if a user-defined function can be easily instantiated. */
private static void validateInstantiation(Class<?> clazz, boolean requiresDefaultConstructor) {
if (!InstantiationUtil.isPublic(clazz)) {
throw new ValidationException(
String.format("Function class '%s' is not public.", cl... | 3.68 |
zxing_ResultHandler_openProductSearch | // Uses the mobile-specific version of Product Search, which is formatted for small screens.
final void openProductSearch(String upc) {
Uri uri = Uri.parse("http://www.google." + LocaleManager.getProductSearchCountryTLD(activity) +
"/m/products?q=" + upc + "&source=zxing");
launchIntent(new Intent(Intent.ACTI... | 3.68 |
dubbo_EdsEndpointManager_getEdsListeners | // for test
static ConcurrentHashMap<String, Consumer<Map<String, EndpointResult>>> getEdsListeners() {
return EDS_LISTENERS;
} | 3.68 |
flink_MapValue_put | /*
* (non-Javadoc)
* @see java.util.Map#put(java.lang.Object, java.lang.Object)
*/
@Override
public V put(final K key, final V value) {
return this.map.put(key, value);
} | 3.68 |
framework_NotificationElement_close | /**
* Closes a notification.
*
* @throws TimeoutException
* If a notification can not be closed and the timeout expires.
*/
public void close() {
click();
WebDriverWait wait = new WebDriverWait(getDriver(), 10);
wait.until(ExpectedConditions
.not(ExpectedConditions.presenceOfAll... | 3.68 |
hadoop_OBSListing_getBatchSize | /**
* Get the number of entries in the current batch.
*
* @return a number, possibly zero.
*/
public int getBatchSize() {
return batchSize;
} | 3.68 |
hadoop_BytesWritable_set | /**
* Set the value to a copy of the given byte range.
*
* @param newData the new values to copy in
* @param offset the offset in newData to start at
* @param length the number of bytes to copy
*/
public void set(byte[] newData, int offset, int length) {
setSize(0);
setSize(length);
System.arraycopy(newData... | 3.68 |
hadoop_AbfsThrottlingInterceptFactory_referenceLost | /**
* Reference lost callback.
* @param accountName key lost.
*/
private static void referenceLost(String accountName) {
lostReferences.add(accountName);
} | 3.68 |
pulsar_NarClassLoader_updateClasspath | /**
* Adds URLs for the resources unpacked from this NAR:
* <ul>
* <li>the root: for classes, <tt>META-INF</tt>, etc.</li>
* <li><tt>META-INF/dependencies</tt>: for config files, <tt>.so</tt>s, etc.</li>
* <li><tt>META-INF/dependencies/*.jar</tt>: for dependent libraries</li>
* </ul>
*
* @param root
* ... | 3.68 |
hadoop_DomainRowKey_encode | /*
* (non-Javadoc)
*
* Encodes DomainRowKey object into a byte array
*
* @see org.apache.hadoop.yarn.server.timelineservice.storage.common
* .KeyConverter#encode(java.lang.Object)
*/
@Override
public byte[] encode(DomainRowKey rowKey) {
if (rowKey == null) {
return Separator.EMPTY_BYTES;
}
byte[] clus... | 3.68 |
hbase_ClusterId_convert | /** Returns A {@link ClusterId} made from the passed in <code>cid</code> */
public static ClusterId convert(final ClusterIdProtos.ClusterId cid) {
return new ClusterId(cid.getClusterId());
} | 3.68 |
hadoop_BlockStorageMovementAttemptedItems_stopGracefully | /**
* Timed wait to stop monitor thread.
*/
synchronized void stopGracefully() {
if (timerThread == null) {
return;
}
if (monitorRunning) {
stop();
}
try {
timerThread.join(3000);
} catch (InterruptedException ie) {
}
} | 3.68 |
hbase_FileArchiverNotifierImpl_groupArchivedFiledBySnapshotAndRecordSize | /**
* For each file in the map, this updates the first snapshot (lexicographic snapshot name) that
* references this file. The result of this computation is serialized to the quota table.
* @param snapshots A collection of HBase snapshots to group the files into
* @param fileSizes A map of file names to their sizes... | 3.68 |
hbase_AsyncAdmin_getReplicationPeerSyncReplicationState | /**
* Get the current cluster state in a synchronous replication peer.
* @param peerId a short name that identifies the peer
* @return the current cluster state wrapped by a {@link CompletableFuture}.
*/
default CompletableFuture<SyncReplicationState>
getReplicationPeerSyncReplicationState(String peerId) {
Comp... | 3.68 |
graphhopper_ResponsePath_calcBBox2D | /**
* Calculates the 2D bounding box of this route
*/
public Envelope calcBBox2D() {
check("calcBBox2D");
Envelope bounds = new Envelope();
for (int i = 0; i < pointList.size(); i++) {
bounds.expandToInclude(pointList.getLon(i), pointList.getLat(i));
}
return bounds;
} | 3.68 |
framework_PopupDateField_getInputPrompt | /**
* Gets the current input prompt.
*
* @see #setInputPrompt(String)
* @return the current input prompt, or null if not enabled
*/
public String getInputPrompt() {
return inputPrompt;
} | 3.68 |
flink_MetricOptions_forReporter | /**
* Returns a view over the given configuration via which options can be set/retrieved for the
* given reporter.
*
* <pre>
* Configuration config = ...
* MetricOptions.forReporter(config, "my_reporter")
* .set(MetricOptions.REPORTER_INTERVAL, Duration.ofSeconds(10))
* ...
* </pre>
*
... | 3.68 |
hbase_KeyValue_compareRows | /**
* Get the b[],o,l for left and right rowkey portions and compare.
* @param left the left kv serialized byte[] to be compared with
* @param loffset the offset in the left byte[]
* @param llength the length in the left byte[]
* @param right the right kv serialized byte[] to be compared with
* @param roffse... | 3.68 |
flink_TieredStorageProducerClient_write | /**
* Write records to the producer client. The {@link BufferAccumulator} will accumulate the
* records into buffers.
*
* <p>Note that isBroadcast indicates whether the record is broadcast, while isBroadcastOnly
* indicates whether the result partition is broadcast-only. When the result partition is not
* broadca... | 3.68 |
morf_AbstractSqlDialectTest_testSelectForUpdate | /**
* Tests the SQL for select for update
*/
@Test
public void testSelectForUpdate() {
SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE)).forUpdate();
assertEquals("SQL to select for update", "SELECT * FROM " + tableName(TEST_TABLE) + expectedForUpdate(), testDialect.convertStatemen... | 3.68 |
hbase_MetricsTableRequests_updateIncrement | /**
* Update the Increment time histogram.
* @param time time it took
* @param blockBytesScanned size of block bytes scanned to retrieve the response
*/
public void updateIncrement(long time, long blockBytesScanned) {
if (isEnableTableLatenciesMetrics()) {
incrementTimeHistogram.update(time);
... | 3.68 |
framework_VSlider_setId | /**
* Sets the id of this component's connector.
*
* @param id
* the connector id
* @deprecated the updated field is no longer used by the framework
*/
@Deprecated
public void setId(String id) {
this.id = id;
} | 3.68 |
hbase_Bytes_toShort | /**
* Converts a byte array to a short value
* @param bytes byte array
* @param offset offset into array
* @param length length, has to be {@link #SIZEOF_SHORT}
* @return the short value
* @throws IllegalArgumentException if length is not {@link #SIZEOF_SHORT} or if there's not
* ... | 3.68 |
hadoop_TypedBytesInput_readBool | /**
* Reads the boolean following a <code>Type.BOOL</code> code.
* @return the obtained boolean
* @throws IOException
*/
public boolean readBool() throws IOException {
return in.readBoolean();
} | 3.68 |
dubbo_AdaptiveClassCodeGenerator_generateExtNameAssignment | /**
* generate extName assignment code
*/
private String generateExtNameAssignment(String[] value, boolean hasInvocation) {
// TODO: refactor it
String getNameCode = null;
for (int i = value.length - 1; i >= 0; --i) {
if (i == value.length - 1) {
if (null != defaultExtName) {
... | 3.68 |
dubbo_RpcServiceContext_setRemoteAddress | /**
* set remote address.
*
* @param address
* @return context
*/
@Override
public RpcServiceContext setRemoteAddress(InetSocketAddress address) {
this.remoteAddress = address;
return this;
} | 3.68 |
framework_TableScrollAfterAddRow_getTicketNumber | /*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#getTicketNumber()
*/
@Override
protected Integer getTicketNumber() {
return 14147;
} | 3.68 |
framework_AbstractSplitPanel_setFirstComponent | /**
* Sets the first component of this split panel. Depending on the direction
* the first component is shown at the top or to the left.
*
* @param c
* The component to use as first component
*/
public void setFirstComponent(Component c) {
if (getFirstComponent() == c) {
// Nothing to do
... | 3.68 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.