name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_CheckpointCommand_getSignature_rdh | /**
* Checkpoint signature is used to ensure
* that nodes are talking about the same checkpoint.
*/
public CheckpointSignature getSignature() {
return cSig;
} | 3.26 |
hadoop_StorageStatistics_getValue_rdh | /**
*
* @return The value of this statistic.
*/
public long getValue() {
return f1;
} | 3.26 |
hadoop_StorageStatistics_getName_rdh | /**
* Get the name of this StorageStatistics object.
*
* @return name of this StorageStatistics object
*/
public String getName() {
return name;
} | 3.26 |
hadoop_AbfsThrottlingInterceptFactory_getInstance_rdh | /**
* Returns an instance of AbfsThrottlingIntercept.
*
* @param accountName
* The account for which we need instance of throttling intercept.
* @param abfsConfiguration
* The object of abfsconfiguration class.
* @return Instance of AbfsThrottlingIntercept.
*/
static synchronized AbfsThrottlingIntercept ge... | 3.26 |
hadoop_AbfsThrottlingInterceptFactory_factory_rdh | /**
* Returns instance of throttling intercept.
*
* @param accountName
* Account name.
* @return instance of throttling intercept.
*/
private static AbfsClientThrottlingIntercept factory(final String accountName) {
return new AbfsClientThrottlingIntercept(accountName, abfsConfig);
} | 3.26 |
hadoop_AbfsThrottlingInterceptFactory_referenceLost_rdh | /**
* Reference lost callback.
*
* @param accountName
* key lost.
*/
private static void referenceLost(String accountName) {
lostReferences.add(accountName);
} | 3.26 |
hadoop_TimelineFilterList_getOperator_rdh | /**
* Get the operator.
*
* @return operator
*/
public Operator getOperator() {
return operator;
} | 3.26 |
hadoop_TimelineFilterList_m0_rdh | /**
* Get the filter list.
*
* @return filterList
*/
public List<TimelineFilter> m0() { return filterList;
} | 3.26 |
hadoop_InMemoryConfigurationStore_getCurrentVersion_rdh | /**
* Configuration mutations not logged (i.e. not persisted). As such, they are
* not persisted and not versioned. Hence, a current version is not
* applicable.
*
* @return null A current version not applicable for this store.
*/... | 3.26 |
hadoop_InMemoryConfigurationStore_checkVersion_rdh | /**
* Configuration mutations not logged (i.e. not persisted). As such, they are
* not persisted and not versioned. Hence, version is always compatible,
* since it is in-memory.
*/
@Override
public void checkVersion() {
// Does nothing. (Version is always compatible since it's in memory)
} | 3.26 |
hadoop_InMemoryConfigurationStore_storeVersion_rdh | /**
* Configuration mutations not logged (i.e. not persisted). As such, they are
* not persisted and not versioned. Hence, no version information to store.
*
* @throws Exception
* if any exception occurs during store Version.
*/
@Override
public void storeVersion() throws Exception {
// Does nothing.
} | 3.26 |
hadoop_InMemoryConfigurationStore_getConfStoreVersion_rdh | /**
* Configuration mutations applied directly in-memory. As such, there is no
* persistent configuration store.
* As there is no configuration store for versioning purposes,
* a conf store version is not applicable.
*
* @return null Conf store version not applicable for this store.
* @throws Exception
* if a... | 3.26 |
hadoop_InMemoryConfigurationStore_getLogs_rdh | /**
* Configuration mutations not logged (i.e. not persisted) but directly
* confirmed. As such, a list of persisted configuration mutations does not
* exist.
*
* @return null Configuration mutation list not applicable for this store.
*/
@Override
protected LinkedList<LogMutation> getLogs()
{
// Unimplemented... | 3.26 |
hadoop_InMemoryConfigurationStore_logMutation_rdh | /**
* This method does not log as it does not support backing store.
* The mutation to be applied on top of schedConf will be directly passed
* in confirmMutation.
*/
@Override
public void logMutation(LogMutation logMutation) {
} | 3.26 |
hadoop_InMemoryConfigurationStore_getConfirmedConfHistory_rdh | /**
* Configuration mutations not logged (i.e. not persisted) but directly
* confirmed. As such, a list of persisted configuration mutations does not
* exist.
*
* @return null Configuration mutation list not applicable for this store.
*/
@Override
public List<LogMutation> getConfirmedConfHistory(long fromId) {// ... | 3.26 |
hadoop_MappingRuleActionBase_setFallbackSkip_rdh | /**
* Sets the fallback method to skip, if the action cannot be executed
* We move onto the next rule, ignoring this one.
*
* @return MappingRuleAction The same object for method chaining.
*/
public MappingRuleAction setFallbackSkip() {
fallback = MappingRuleResult.createSkipResult();
return this;
} | 3.26 |
hadoop_MappingRuleActionBase_setFallbackDefaultPlacement_rdh | /**
* Sets the fallback method to place to default, if the action cannot be
* executed the application will be placed into the default queue, if the
* default queue does not exist the application will get rejected.
*
* @return MappingRuleAction The same object for method chaining.
*/
public MappingRuleAction setF... | 3.26 |
hadoop_MappingRuleActionBase_getFallback_rdh | /**
* Returns the fallback action to be taken if the main action (result returned
* by the execute method) fails.
* e.g. Target queue does not exist, or reference is ambiguous
*
* @return The fallback action to be taken if the main action fails
*/
public MappingRuleResult getFallback() {
return fallback;
} | 3.26 |
hadoop_MappingRuleActionBase_setFallbackReject_rdh | /**
* Sets the fallback method to reject, if the action cannot be executed the
* application will get rejected.
*
* @return MappingRuleAction The same object for method chaining.
*/
public MappingRuleAction setFallbackReject() {
fallback = MappingRuleResult.createRejectResult();
return this;
} | 3.26 |
hadoop_TimestampGenerator_getTruncatedTimestamp_rdh | /**
* truncates the last few digits of the timestamp which were supplemented by
* the TimestampGenerator#getSupplementedTimestamp function.
*
* @param incomingTS
* Timestamp to be truncated.
* @return a truncated timestamp value
*/
public static long getTruncatedTimestamp(long incomingTS) {
return incoming... | 3.26 |
hadoop_TimestampGenerator_getUniqueTimestamp_rdh | /**
* Returns a timestamp value unique within the scope of this
* {@code TimestampGenerator} instance. For usage by HBase
* {@code RegionObserver} coprocessors, this normally means unique within a
* given region.
*
* Unlikely scenario of generating a non-unique timestamp: if there is a
* sustained rate of more t... | 3.26 |
hadoop_MutableStat_setUpdateTimeStamp_rdh | /**
* Set whether to update the snapshot time or not.
*
* @param updateTimeStamp
* enable update stats snapshot timestamp
*/
public synchronized void setUpdateTimeStamp(boolean updateTimeStamp) {
this.updateTimeStamp = updateTimeStamp;
} | 3.26 |
hadoop_MutableStat_lastStat_rdh | /**
* Return a SampleStat object that supports
* calls like StdDev and Mean.
*
* @return SampleStat
*/
public SampleStat lastStat() {
return
changed() ? intervalStat : prevStat;
} | 3.26 |
hadoop_MutableStat_resetMinMax_rdh | /**
* Reset the all time min max of the metric
*/
public void resetMinMax() {
minMax.reset();
} | 3.26 |
hadoop_MutableStat_add_rdh | /**
* Add a snapshot to the metric.
*
* @param value
* of the metric
*/
public synchronized void add(long value) {
intervalStat.add(value);
minMax.add(value);
setChanged();
} | 3.26 |
hadoop_MutableStat_getSnapshotTimeStamp_rdh | /**
*
* @return Return the SampleStat snapshot timestamp.
*/
public long getSnapshotTimeStamp() {
return snapshotTimeStamp;
} | 3.26 |
hadoop_EntityCacheItem_forceRelease_rdh | /**
* Force releasing the cache item for the given group id, even though there
* may be active references.
*/
public synchronized void forceRelease() {
try {
if (store != null) {
store.close();
}
} catch (IOException e) {
LOG.warn("Error closing timeline store", e);
... | 3.26 |
hadoop_EntityCacheItem_getAppLogs_rdh | /**
*
* @return The application log associated to this cache item, may be null.
*/
public synchronized AppLogs getAppLogs() {
return this.appLogs;
} | 3.26 |
hadoop_EntityCacheItem_setAppLogs_rdh | /**
* Set the application logs to this cache item. The entity group should be
* associated with this application.
*
* @param incomingAppLogs
* Application logs this cache item mapped to
*/
public synchronized void setAppLogs(EntityGroupFSTimelineStore.AppLogs incomingAppLogs) {
this.appLogs =
incomingAp... | 3.26 |
hadoop_Trash_expunge_rdh | /**
* Delete old checkpoint(s).
*
* @throws IOException
* raised on errors performing I/O.
*/
public void expunge() throws IOException {
trashPolicy.deleteCheckpoint();} | 3.26 |
hadoop_Trash_getCurrentTrashDir_rdh | /**
* get the current working directory.
*
* @throws IOException
* on raised on errors performing I/O.
* @return Trash Dir.
*/
Path getCurrentTrashDir() throws IOException {
return trashPolicy.getCurrentTrashDir();
} | 3.26 |
hadoop_Trash_moveToAppropriateTrash_rdh | /**
* In case of the symlinks or mount points, one has to move the appropriate
* trashbin in the actual volume of the path p being deleted.
*
* Hence we get the file system of the fully-qualified resolved-path and
* then move the path p to the trashbin in that volume,
*
* @param fs
* - the filesystem of path ... | 3.26 |
hadoop_Trash_checkpoint_rdh | /**
* Create a trash checkpoint.
*
* @throws IOException
* raised on errors performing I/O.
*/
public void checkpoint() throws IOException {
trashPolicy.createCheckpoint();
} | 3.26 |
hadoop_Trash_moveToTrash_rdh | /**
* Move a file or directory to the current trash directory.
*
* @param path
* the path.
* @return false if the item is already in the trash or trash is disabled
* @throws IOException
* raised on errors performing I/O.
*/
public boolean moveToTrash(Path path) throws IOException {
return trashPolicy.mo... | 3.26 |
hadoop_Trash_getTrashPolicy_rdh | /**
* get the configured trash policy.
*
* @return TrashPolicy.
*/
TrashPolicy getTrashPolicy() {
return trashPolicy;
} | 3.26 |
hadoop_Trash_expungeImmediately_rdh | /**
* Delete all trash immediately.
*
* @throws IOException
* raised on errors performing I/O.
*/
public void expungeImmediately() throws IOException {
trashPolicy.createCheckpoint();
trashPolicy.deleteCheckpointsImmediately();
} | 3.26 |
hadoop_Trash_getEmptier_rdh | /**
* Return a {@link Runnable} that periodically empties the trash of all
* users, intended to be run by the superuser.
*
* @throws IOException
* on raised on errors performing I/O.
* @return Runnable.
*/
public Runnable getEmptier() throws IOException {
return trashPolicy.getEmptier();
} | 3.26 |
hadoop_Trash_isEnabled_rdh | /**
* Returns whether the trash is enabled for this filesystem.
*
* @return return if isEnabled true,not false.
*/
public boolean isEnabled() {
return trashPolicy.isEnabled();
} | 3.26 |
hadoop_DataStatistics_meanCI_rdh | /**
* calculates the mean value within 95% ConfidenceInterval.
* 1.96 is standard for 95 %
*
* @return the mean value adding 95% confidence interval
*/
public synchronized double meanCI() {
if (count <= 1) {
return 0.0;
}
double currMean = mean();
double currStd = std();
return currMea... | 3.26 |
hadoop_PositionedReadable_minSeekForVectorReads_rdh | /**
* What is the smallest reasonable seek?
*
* @return the minimum number of bytes
*/
default int minSeekForVectorReads() {
return 4 * 1024;
} | 3.26 |
hadoop_PositionedReadable_maxReadSizeForVectorReads_rdh | /**
* What is the largest size that we should group ranges together as?
*
* @return the number of bytes to read at once
*/
default int maxReadSizeForVectorReads() {
return 1024 * 1024;
} | 3.26 |
hadoop_PositionedReadable_readVectored_rdh | /**
* Read fully a list of file ranges asynchronously from this file.
* The default iterates through the ranges to read each synchronously, but
* the intent is that FSDataInputStream subclasses can make more efficient
* readers.
* As a result of the call, each range will have FileRange.setData(CompletableFuture)
... | 3.26 |
hadoop_FieldSelectionHelper_extractFields_rdh | /**
* Extract the actual field numbers from the given field specs.
* If a field spec is in the form of "n-" (like 3-), then n will be the
* return value. Otherwise, -1 will be returned.
*
* @param fieldListSpec
* an array of field specs
* @param fieldList
* an array of field numbers extracted from the specs... | 3.26 |
hadoop_ApplicationTableRW_setMetricsTTL_rdh | /**
*
* @param metricsTTL
* time to live parameter for the metrics in this table.
* @param hbaseConf
* configuration in which to set the metrics TTL config
* variable.
*/
public void setMetricsTTL(int metricsTTL, Configuration hbaseConf) {
hbaseConf.setInt(METRICS_TTL_CONF_NAME, metricsTTL);
} | 3.26 |
hadoop_JournalNodeRpcServer_getRpcServer_rdh | /**
* Allow access to the RPC server for testing.
*/
@VisibleForTesting
Server getRpcServer() {
return server;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_set_rdh | /**
* Set an attribute. If the value is non-null/empty,
* it will be used as a query parameter.
*
* @param key
* key to set
* @param value
* value.
*/
public void set(final String key, final String value) {
addAttribute(requireNonNull(key), value);
} | 3.26 |
hadoop_HttpReferrerAuditHeader_withSpanId_rdh | /**
* Set ID.
*
* @param value
* new value
* @return the builder
*/
public Builder withSpanId(final String value) {
spanId = value;
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_withOperationName_rdh | /**
* Set Operation name.
*
* @param value
* new value
* @return the builder
*/
public Builder withOperationName(final String value) {
operationName =
value;
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_withGlobalContextValues_rdh | /**
* Set the global context values (replaces the default binding
* to {@link CommonAuditContext#getGlobalContextEntries()}).
*
* @param value
* new value
* @return the builder
*/
public Builder withGlobalContextValues(final Iterable<Map.Entry<String, String>>
value) {
globalContextValues = value;
ret... | 3.26 |
hadoop_HttpReferrerAuditHeader_withPath2_rdh | /**
* Set Path2 of operation.
*
* @param value
* new value
* @return the builder
*/public Builder withPath2(final String value) {
path2 = value;
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_addAttribute_rdh | /**
* Add a query parameter if not null/empty
* There's no need to escape here as it is done in the URI
* constructor.
*
* @param key
* query key
* @param value
* query value
*/
private void addAttribute(String key, String
value) {
if (StringUtils.isNotEmpty(value)) {
attributes.put(key, value)... | 3.26 |
hadoop_HttpReferrerAuditHeader_withFilter_rdh | /**
* Declare the fields to filter.
*
* @param fields
* iterable of field names.
* @return the builder
*/
public Builder withFilter(final Collection<String> fields) {
this.filter = new HashSet<>(fields);
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_withContextId_rdh | /**
* Set context ID.
*
* @param value
* context
* @return the builder
*/
public Builder withContextId(final
String value) {
contextId = value;
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_builder_rdh | /**
* Get a builder.
*
* @return a new builder.
*/
public static Builder builder() {
return new Builder();
} | 3.26 |
hadoop_HttpReferrerAuditHeader_build_rdh | /**
* Build.
*
* @return an HttpReferrerAuditHeader
*/
public HttpReferrerAuditHeader build() {
return new HttpReferrerAuditHeader(this);
} | 3.26 |
hadoop_HttpReferrerAuditHeader_withAttribute_rdh | /**
* Add an attribute to the current map.
* Replaces any with the existing key.
*
* @param key
* key to set/update
* @param value
* new value
* @return the builder
*/
public Builder withAttribute(String key, String value) {
attributes.put(key, value);
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_extractQueryParameters_rdh | /**
* Split up the string. Uses httpClient: make sure it is on the classpath.
* Any query param with a name but no value, e.g ?something is
* returned in the map with an empty string as the value.
*
* @param header
* URI to parse
* @return a map of parameters.
* @throws URISyntaxException
* failure to buil... | 3.26 |
hadoop_HttpReferrerAuditHeader_withPath1_rdh | /**
* Set Path1 of operation.
*
* @param value
* new value
* @return the builder
*/
public Builder withPath1(final String value) {
path1 = value;
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_withEvaluated_rdh | /**
* Add an evaluated attribute to the current map.
* Replaces any with the existing key.
* Set evaluated methods.
*
* @param key
* key
* @param value
* new value
* @return the builder
*/
public Builder
withEvaluated(String key, Supplier<String> value) {
evaluated.put(key, value);
return this;
} | 3.26 |
hadoop_HttpReferrerAuditHeader_buildHttpReferrer_rdh | /**
* Build the referrer string.
* This includes dynamically evaluating all of the evaluated
* attributes.
* If there is an error creating the string it will be logged once
* per entry, and "" returned.
*
* @return a referrer string or ""
*/
public String buildHttpReferrer() {
String header;
try {
... | 3.26 |
hadoop_HttpReferrerAuditHeader_escapeToPathElement_rdh | /**
* Perform any escaping to valid path elements in advance of
* new URI() doing this itself. Only path separators need to
* be escaped/converted at this point.
*
* @param source
* source string
* @return an escaped path element.
*/
public static String escapeToPathElement(CharSequence source) {
int len ... | 3.26 |
hadoop_HttpReferrerAuditHeader_withAttributes_rdh | /**
* Add all attributes to the current map.
*
* @param value
* new value
* @return the builder
*/
public Builder withAttributes(final Map<String, String> value) {attributes.putAll(value);
return this;
} | 3.26 |
hadoop_VolumeAMSProcessor_checkAndGetVolume_rdh | /**
* If given volume ID already exists in the volume manager,
* it returns the existing volume. Otherwise, it creates a new
* volume and add that to volume manager.
*
* @param metaData
* @return volume
*/
private Volume checkAndGetVolume(VolumeMetaData metaData) throws InvalidVolumeException {
Volume toAdd... | 3.26 |
hadoop_VolumeAMSProcessor_aggregateVolumesFrom_rdh | // Currently only scheduling request is supported.
private List<Volume> aggregateVolumesFrom(AllocateRequest request) throws VolumeException {
List<Volume> volumeList = new ArrayList<>();
List<SchedulingRequest> requests = request.getSchedulingRequests();if (requests != null) {
for (SchedulingRequest re... | 3.26 |
hadoop_GetContentSummaryOperation_getDirSummary_rdh | /**
* Return the {@link ContentSummary} of a given directory.
*
* @param dir
* dir to scan
* @throws FileNotFoundException
* if the path does not resolve
* @throws IOException
* IO failure
* @return the content summary
* @throws FileNotFoundException
* the path does not exist
* @throws IOException
... | 3.26 |
hadoop_GetContentSummaryOperation_execute_rdh | /**
* Return the {@link ContentSummary} of a given path.
*
* @return the summary.
* @throws FileNotFoundException
* if the path does not resolve
* @throws IOException
* failure
*/
@Override
@Retries.RetryTranslated
public ContentSummary execute() throws IOException {
FileStatus status = probePathStatusO... | 3.26 |
hadoop_GetContentSummaryOperation_buildDirectorySet_rdh | /**
* *
* This method builds the set of all directories found under the base path. We need to do this
* because if the directory structure /a/b/c was created with a single mkdirs() call, it is
* stored as 1 object in S3 and the list files iterator will only return a single entry /a/b/c.
*
* We keep track of paths... | 3.26 |
hadoop_GetContentSummaryOperation_probePathStatusOrNull_rdh | /**
* Get the status of a path, downgrading FNFE to null result.
*
* @param p
* path to probe.
* @param probes
* probes to exec
* @return the status or null
* @throws IOException
* failure other than FileNotFound
*/p... | 3.26 |
hadoop_RenameOperation_removeSourceObjects_rdh | /**
* Remove source objects.
*
* @param keys
* list of keys to delete
* @throws IOException
* failure
*/
@Retries.RetryTranslated
private void removeSourceObjects(final List<ObjectIdentifier> keys) throws IOException {
// remove the keys
// list what is being deleted for the interest of anyone
// who is tryi... | 3.26 |
hadoop_RenameOperation_completeActiveCopies_rdh | /**
* Wait for the active copies to complete then reset the list.
*
* @param reason
* for messages
* @throws IOException
* if one of the called futures raised an IOE.
* @throws RuntimeException
* if one of the futures raised one.
*/
@Retries.OnceTranslated
private void completeActiveCopies(String reason)... | 3.26 |
hadoop_RenameOperation_endOfLoopActions_rdh | /**
* Operations to perform at the end of every loop iteration.
* <p>
* This may block the thread waiting for copies to complete
* and/or delete a page of data.
*/
private void endOfLoopActions() throws IOException {
if (keysToDelete.size() == pageSize) {
// finish ongoing copies then delete all queued keys.
com... | 3.26 |
hadoop_RenameOperation_queueToDelete_rdh | /**
* Queue a single marker for deletion.
* <p>
* See {@link #queueToDelete(Path, String)} for
* details on safe use of this method.
*
* @param marker
* markers
*/
private void queueToDelete(final DirMarkerTracker.Marker marker) {
queueToDelete(marker.getPath(), marker.getKey());
} | 3.26 |
hadoop_RenameOperation_renameFileToDest_rdh | /**
* The source is a file: rename it to the destination, which
* will be under the current destination path if that is a directory.
*
* @return the path of the object created.
* @throws IOException
* failure
*/
protected Path renameFileToDest() throws IOException {
final StoreContext storeContext = getStoreCo... | 3.26 |
hadoop_RenameOperation_convertToIOException_rdh | /**
* Convert a passed in exception (expected to be an IOE or AWS exception)
* into an IOException.
*
* @param ex
* exception caught
* @return the exception to throw in the failure handler.
*/
protected IOException convertToIOException(final Exception ex) {
if (ex instanceof IOException) {
return ((IOExceptio... | 3.26 |
hadoop_RenameOperation_getUploadsAborted_rdh | /**
* Get the count of uploads aborted.
* Non-empty iff enabled, and the operations completed without errors.
*
* @return count of aborted uploads.
*/
public Optional<Long> getUploadsAborted() {
return uploadsAborted;
} | 3.26 |
hadoop_RenameOperation_copySource_rdh | /**
* This is invoked to copy a file or directory marker.
* It may be called in its own thread.
*
* @param srcKey
* source key
* @param srcAttributes
* status of the source object
* @param destination
* destination as a qualified path.
* @param destinationKey
* destination key
* @return the destinat... | 3.26 |
hadoop_RenameOperation_initiateCopy_rdh | /**
* Initiate a copy operation in the executor.
*
* @param source
* status of the source object.
* @param key
* source key
* @param newDestKey
* destination key
* @param childDestPath
* destination path.
* @return the future.
*/
protected CompletableFuture<Path> initiateCopy(final S3ALocatedFileSta... | 3.26 |
hadoop_RenameOperation_recursiveDirectoryRename_rdh | /**
* Execute a full recursive rename.
* There is a special handling of directly markers here -only leaf markers
* are copied. This reduces incompatibility "regions" across versions.
*
* @throws IOException
* failure
*/
protected void recursiveDirectoryRename() throws IOException {
final StoreContext storeCont... | 3.26 |
hadoop_RenameOperation_completeActiveCopiesAndDeleteSources_rdh | /**
* Block waiting for ay active copies to finish
* then delete all queued keys + paths to delete.
*
* @param reason
* reason for logs
* @throws IOException
* failure.
*/
@Retries.RetryTranslated
private void completeActiveCopiesAndDeleteSources(String reason) th... | 3.26 |
hadoop_JobHistoryServer_getBindAddress_rdh | /**
* Retrieve JHS bind address from configuration
*
* @param conf
* @return InetSocketAddress
*/
public static InetSocketAddress getBindAddress(Configuration conf) {
return conf.getSocketAddr(JHAdminConfig.MR_HISTORY_ADDRESS, JHAdminConfig.DEFAULT_MR_HISTORY_ADDRESS, JHAdminConfig.DEFAULT_MR_HISTORY_PORT);
} | 3.26 |
hadoop_EditLogInputStream_getCurrentStreamName_rdh | /**
* Returns the name of the currently active underlying stream. The default
* implementation returns the same value as getName unless overridden by the
* subclass.
*
* @return String name of the currently active underlying stream
*/
public String getCurrentStreamName() {
return m0();
} | 3.26 |
hadoop_EditLogInputStream_scanNextOp_rdh | /**
* Go through the next operation from the stream storage.
*
* @return the txid of the next operation.
*/
protected long scanNextOp() throws IOException {
FSEditLogOp next = readOp();
return next != null ? next.txid : HdfsServerConstants.INVALID_TXID;
} | 3.26 |
hadoop_EditLogInputStream_nextValidOp_rdh | /**
* Get the next valid operation from the stream storage.
*
* This is exactly like nextOp, except that we attempt to skip over damaged
* parts of the edit log
*
* @return an operation from the stream or null if at end of stream
*/
protected FSEditLogOp nextValidOp() {
// This is a trivial implementation wh... | 3.26 |
hadoop_EditLogInputStream_resync_rdh | /**
* Position the stream so that a valid operation can be read from it with
* readOp().
*
* This method can be used to skip over corrupted sections of edit logs.
*/
public void resync() {
if (cachedOp != null) {
return;
}
cachedOp = nextValidOp();
} | 3.26 |
hadoop_EditLogInputStream_readOp_rdh | /**
* Read an operation from the stream
*
* @return an operation from the stream or null if at end of stream
* @throws IOException
* if there is an error reading from the stream
*/
public FSEditLogOp readOp() throws IOException {
FSEditLogOp ret;
if (cachedOp != null) {
ret = cachedOp;
c... | 3.26 |
hadoop_EditLogInputStream_getCachedOp_rdh | /**
* return the cachedOp, and reset it to null.
*/
FSEditLogOp getCachedOp() {
FSEditLogOp op = this.cachedOp;
cachedOp = null;
return op;
} | 3.26 |
hadoop_AMRMTokenSecretManager_retrievePassword_rdh | /**
* Retrieve the password for the given {@link AMRMTokenIdentifier}.
* Used by RPC layer to validate a remote {@link AMRMTokenIdentifier}.
*/
@Override
public byte[] retrievePassword(AMRMTokenIdentifier identifier) throws InvalidToken {
this.readLock.lock();
try {
ApplicationAttemptId applicationA... | 3.26 |
hadoop_AMRMTokenSecretManager_addPersistedPassword_rdh | /**
* Populate persisted password of AMRMToken back to AMRMTokenSecretManager.
*
* @param token
* AMRMTokenIdentifier.
* @throws IOException
* an I/O exception has occurred.
*/
public void addPersistedPassword(Token<AMRMTokenIdentifier> token) throws IOException {
this.writeLock.lock();
try {
... | 3.26 |
hadoop_AMRMTokenSecretManager_getMasterKey_rdh | // If nextMasterKey is not Null, then return nextMasterKey
// otherwise return currentMasterKey
@VisibleForTesting
public MasterKeyData getMasterKey() {
this.readLock.lock();
try {
return nextMasterKey == null ?
currentMasterKey : nextMasterKey;
} finally {
this.readLock.unlock();
... | 3.26 |
hadoop_AMRMTokenSecretManager_createIdentifier_rdh | /**
* Creates an empty TokenId to be used for de-serializing an
* {@link AMRMTokenIdentifier} by the RPC layer.
*/
@Override
public AMRMTokenIdentifier createIdentifier() {
return new AMRMTokenIdentifier();
} | 3.26 |
hadoop_TimedHealthReporterService_setHealthy_rdh | /**
* Sets if the node is healthy or not.
*
* @param healthy
* whether the node is healthy
*/
protected synchronized void setHealthy(boolean healthy) {
this.isHealthy = healthy;
} | 3.26 |
hadoop_TimedHealthReporterService_serviceStop_rdh | /**
* Method used to terminate the health monitoring service.
*/
@Override
protected void serviceStop() throws Exception {
if (timer != null) {
timer.cancel();
}
super.serviceStop();
} | 3.26 |
hadoop_TimedHealthReporterService_setHealthReport_rdh | /**
* Sets the health report from the node health check. Also set the disks'
* health info obtained from DiskHealthCheckerService.
*
* @param report
* report String
*/
private synchronized void setHealthReport(String report)
{
this.healthReport = report;
} | 3.26 |
hadoop_TimedHealthReporterService_setLastReportedTime_rdh | /**
* Sets the last run time of the node health check.
*
* @param lastReportedTime
* last reported time in long
*/
private synchronized void setLastReportedTime(long lastReportedTime) {
this.lastReportedTime = lastReportedTime;
} | 3.26 |
hadoop_SolverPreprocessor_validate_rdh | /**
* Check if Solver's input parameters are valid.
*
* @param jobHistory
* the history {@link ResourceSkyline}s of the recurring
* pipeline job.
* @param timeInterval
* the time interval which is used to discretize the
* history {@link ResourceSkyline}s.
* @throws InvalidInputException
* if: (1) jo... | 3.26 |
hadoop_SolverPreprocessor_getResourceVector_rdh | /**
* Return the multi-dimension resource vector consumed by the job at specified
* time.
*
* @param skyList
* the list of {@link Resource}s used by the job.
* @param index
* the discretized time index.
* @param containerMemAlloc
* the multi-dimension resource vector allocated to
* one container.
* @... | 3.26 |
hadoop_SolverPreprocessor_mergeSkyline_rdh | /**
* Merge different jobs' resource skylines into one within the same pipeline.
*
* @param resourceSkylines
* different jobs' resource skylines within the same
* pipeline.
* @return an aggregated resource skyline for the pipeline.
*/
public final ResourceSkyline mergeSkyl... | 3.26 |
hadoop_AppStoreController_get_rdh | /**
* Find yarn application from solr.
*
* @param id
* Application ID
* @return AppEntry
*/
@GET
@Path("get/{id}")
@Produces(MediaType.APPLICATION_JSON)
public AppStoreEntry get(@PathParam("id")
String id) {
AppCatalogSolrClient sc = new AppCatalogSolrClient();
return sc.findAppStoreEntry(id);
}
/**... | 3.26 |
hadoop_LocatedBlockBuilder_newLocatedBlock_rdh | // return new block so tokens can be set
LocatedBlock newLocatedBlock(ExtendedBlock eb, DatanodeStorageInfo[] storage, long pos, boolean isCorrupt) {
LocatedBlock blk = BlockManager.newLocatedBlock(eb, storage, pos, isCorrupt);return blk;
} | 3.26 |
hadoop_RMAuthenticationFilter_doFilter_rdh | /**
* {@inheritDoc }
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest req = ((HttpServletRequest) (request));
String newHeader = req.getHeader(DelegationTokenAuthenticator.... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.