name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_ManifestCommitterSupport_maybeAddIOStatistics_rdh
/** * If the object is an IOStatisticsSource, get and add * its IOStatistics. * * @param o * source object. */ public static void maybeAddIOStatistics(IOStatisticsAggregator ios, Object o) { if (o instanceof IOStatisticsSource) {ios.aggregate(((IOStatisticsSource) (o)).getIOStatistics()); } }
3.26
hadoop_ManifestCommitterSupport_getPendingJobAttemptsPath_rdh
/** * Get the location of pending job attempts. * * @param out * the base output directory. * @return the location of pending job attempts. */ public static Path getPendingJobAttemptsPath(Path out) { return new Path(out, PENDING_DIR_NAME); }
3.26
hadoop_ManifestCommitterSupport_getEtag_rdh
/** * Get an etag from a FileStatus which MUST BE * an implementation of EtagSource and * whose etag MUST NOT BE null/empty. * * @param status * the status; may be null. * @return the etag or null if not provided */ public static String getEtag(FileStatus status) { if (status instanceof EtagSource) { ...
3.26
hadoop_ManifestCommitterSupport_buildJobUUID_rdh
/** * Build a Job UUID from the job conf (if it is * {@link ManifestCommitterConstants#SPARK_WRITE_UUID} * or the MR job ID. * * @param conf * job/task configuration * @param jobId * job ID from YARN or spark. * @return (a job ID, source) */public static Pair<String, String> buildJobUUID(Configuration con...
3.26
hadoop_ManifestCommitterSupport_createManifestOutcome_rdh
/** * Create success/outcome data. * * @param stageConfig * configuration. * @param stage * @return a _SUCCESS object with some diagnostics. */ public static ManifestSuccessData createManifestOutcome(StageConfig stageConfig, String stage) { final ManifestSuccessData outcome = new ManifestSuccessData(); ...
3.26
hadoop_ManifestCommitterSupport_getAppAttemptId_rdh
/** * Get the Application Attempt Id for this job * by looking for {@link MRJobConfig#APPLICATION_ATTEMPT_ID} * in the configuration, falling back to 0 if unset. * For spark it will always be 0, for MR it will be set in the AM * to the {@code ApplicationAttemptId} the AM is launched with. * * @param conf * jo...
3.26
hadoop_ManifestCommitterSupport_manifestPathForTask_rdh
/** * Get the path in the job attempt dir for a manifest for a task. * * @param manifestDir * manifest directory * @param taskId * taskID. * @return the final path to rename the manifest file to */ public static Path manifestPathForTask(Path manifestDir, String taskId) { return new Path(manifestDir, tas...
3.26
hadoop_AbstractMultipartUploader_close_rdh
/** * Perform any cleanup. * The upload is not required to support any operations after this. * * @throws IOException * problems on close. */@Override public void close() throws IOException { }
3.26
hadoop_AbstractMultipartUploader_abortUploadsUnderPath_rdh
/** * {@inheritDoc }. * * @param path * path to abort uploads under. * @return a future to -1. * @throws IOException * raised on errors performing I/O. */ public CompletableFuture<Integer> abortUploadsUnderPath(Path path) throws IOException { m0(path); CompletableFuture<Integer> f = new CompletableF...
3.26
hadoop_AbstractMultipartUploader_checkPutArguments_rdh
/** * Check all the arguments to the * {@link MultipartUploader#putPart(UploadHandle, int, Path, InputStream, long)} * operation. * * @param filePath * Target path for upload (as {@link #startUpload(Path)}). * @param inputStream * Data for this part. Implementations MUST close this * stream after reading...
3.26
hadoop_AbstractMultipartUploader_checkUploadId_rdh
/** * Utility method to validate uploadIDs. * * @param uploadId * Upload ID * @throws IllegalArgumentException * invalid ID */ protected void checkUploadId(byte[] uploadId) throws IllegalArgumentException { checkArgument(uploadId != null, "null uploadId"); check...
3.26
hadoop_AbstractMultipartUploader_m0_rdh
/** * Validate a path. * * @param path * path to check. */ protected void m0(Path path) { Objects.requireNonNull(path, "null path"); checkArgument(path.toString().startsWith(basePath.toString()), "Path %s is not under %s", path, basePath); }
3.26
hadoop_AbstractMultipartUploader_checkPartHandles_rdh
/** * Utility method to validate partHandles. * * @param partHandles * handles * @throws IllegalArgumentException * if the parts are invalid */ protected void checkPartHandles(Map<Integer, PartHandle> partHandles) { checkArgument(!partHandles.isEmpty(), "Empty upload"); partHandles.keySet().stream()....
3.26
hadoop_MkdirOperation_getPathStatusExpectingDir_rdh
/** * Get the status of a path -optimized for paths * where there is a directory marker or child entries. * * Under a magic path, there's no check for a file, * just the listing. * * @param path * path to probe. * @return the status * @throws IOException * failure */ private S3AFileStatus getPathStatusE...
3.26
hadoop_MkdirOperation_execute_rdh
/** * Make the given path and all non-existent parents into * directories. * * @return true if a directory was created or already existed * @throws FileAlreadyExistsException * there is a file at the path specified * @throws IOException * other IO problems */ @Override @Retries.RetryTranslated public Boole...
3.26
hadoop_MkdirOperation_probePathStatusOrNull_rdh
/** * Get the status of a path, downgrading FNFE to null result. * * @param path * path to probe. * @param probes * probes to exec * @return the status or null * @throws IOException * failure other than FileNotFound */ private S3AFileStatus probePathStatusOrNull(final Path path, final Set<StatusProbeEnu...
3.26
hadoop_CommitTaskStage_getTaskManifest_rdh
/** * Get the manifest. * * @return The manifest. */ public TaskManifest getTaskManifest() { return taskManifest; }
3.26
hadoop_CommitTaskStage_getPath_rdh
/** * Get the manifest path. * * @return The path the manifest was saved to. */ public Path getPath() { return path; }
3.26
hadoop_CommitTaskStage_executeStage_rdh
/** * Scan the task attempt dir then save the manifest. * A snapshot of the IOStats will be included in the manifest; * this includes the scan time. * * @param arguments * arguments to the function. * @return the path the manifest was saved to, and the manifest. * @throws IOException * IO failure. */ @Ove...
3.26
hadoop_ValueAggregatorMapper_map_rdh
/** * the map function. It iterates through the value aggregator descriptor * list to generate aggregation id/value pairs and emit them. */ public void map(K1 key, V1 value, Context context) throws IOException, InterruptedException { Iterator<?> iter = ValueAggregatorJobBase.aggregatorDescriptorList.iterator();...
3.26
hadoop_ExternalSPSFilePathCollector_processPath_rdh
/** * Recursively scan the given path and add the file info to SPS service for * processing. */ private long processPath(Long startID, String childPath) { long pendingWorkCount = 0;// to be satisfied file counter for (byte[] lastReturnedName = HdfsFileStatus.EMPTY_NAME; ;) { final DirectoryListing c...
3.26
hadoop_ExternalSPSFilePathCollector_remainingCapacity_rdh
/** * Returns queue remaining capacity. */ public int remainingCapacity() { int size = service.processingQueueSize(); int remainingSize = 0; if (size < maxQueueLimitToScan) { remainingSize = maxQueueLimitToScan - size; } if (f0.isDebugEnabled()) { f0.debug("SPS processing Q -> maximum capacity:{}, current size:{}," +...
3.26
hadoop_RawErasureDecoder_m0_rdh
/** * Should be called when release this coder. Good chance to release encoding * or decoding buffers */ public void m0() { // Nothing to do here. }
3.26
hadoop_RawErasureDecoder_allowChangeInputs_rdh
/** * Allow change into input buffers or not while perform encoding/decoding. * * @return true if it's allowed to change inputs, false otherwise */ public boolean allowChangeInputs() { return coderOptions.allowChangeInputs(); }
3.26
hadoop_RawErasureDecoder_decode_rdh
/** * Decode with inputs and erasedIndexes, generates outputs. More see above. * * Note, for both input and output ECChunks, no mixing of on-heap buffers and * direct buffers are allowed. * * @param inputs * input buffers to read data from * @param erasedIndexes * i...
3.26
hadoop_ExternalSPSBeanMetrics_close_rdh
/** * Unregister the JMX interfaces. */ public void close() { if (externalSPSBeanName != null) { MBeans.unregister(externalSPSBeanName); externalSPSBeanName = null; } }
3.26
hadoop_Sender_op_rdh
/** * Initialize a operation. */private static void op(final DataOutput out, final Op op) throws IOException {out.writeShort(DataTransferProtocol.DATA_TRANSFER_VERSION); op.write(out); }
3.26
hadoop_CreateDirsMojo_getTestsThreadCount_rdh
/** * Get the real number of parallel threads. * * @return int number of threads */ public int getTestsThreadCount() { int threadCount = 1; if (testsThreadCount != null) { String trimProp = testsThreadCount.trim(); if (trimProp.endsWith("C")) { double multiplier = D...
3.26
hadoop_NativeAzureFileSystemHelper_logAllLiveStackTraces_rdh
/* Helper method that logs stack traces from all live threads. */ public static void logAllLiveStackTraces() { for (Map.Entry<Thread, StackTraceElement[]> entry : Thread.getAllStackTraces().entrySet()) { f0.debug("Thread " + entry.getKey().getName()); StackTraceElement[] trace = entr...
3.26
hadoop_NativeAzureFileSystemHelper_validateReadArgs_rdh
/** * Validation code, based on * {@code FSInputStream.validatePositionedReadArgs()}. * * @param buffer * destination buffer * @param offset * offset within the buffer * @param length * length of bytes to read * @throws EOFException * if the position is negative * @throws IndexOutOfBoundsException ...
3.26
hadoop_EnumSetParam_toString_rdh
/** * Convert an EnumSet to a string of comma separated values. */ public static <E extends Enum<E>> String toString(EnumSet<E> set) { if ((set == null) || set.isEmpty()) { return ""; } else { final StringBuilder b = new StringBuilder(); final Iterator<E> i = set.iterator(); b...
3.26
hadoop_ImageVisitor_visitEnclosingElement_rdh
// Convenience methods to automatically convert value types to strings void visitEnclosingElement(ImageElement element, ImageElement key, int value) throws IOException { visitEnclosingElement(element, key, Integer.toString(value)); }
3.26
hadoop_ImageVisitor_visit_rdh
// Convenience methods to automatically convert numeric value types to strings void visit(ImageElement element, int value) throws IOException { visit(element, Integer.toString(value)); }
3.26
hadoop_ProtobufWrapperLegacy_isUnshadedProtobufMessage_rdh
/** * Is a message an unshaded protobuf message? * * @param payload * payload * @return true if protobuf.jar is on the classpath and the payload is a Message */ public static boolean isUnshadedProtobufMessage(Object payload) { if (PROTOBUF_KNOWN_NOT_FOUND.get()) { // protobuf is known to be absent. ...
3.26
hadoop_BalanceProcedure_delayMillisBeforeRetry_rdh
/** * The time in milliseconds the procedure should wait before retry. */ public long delayMillisBeforeRetry() { return delayDuration; }
3.26
hadoop_BalanceProcedure_name_rdh
/** * Get the procedure name. */ public String name() { return name; }
3.26
hadoop_BalanceProcedure_isSchedulerShutdown_rdh
/** * The active flag. */ protected boolean isSchedulerShutdown() {return job.isSchedulerShutdown(); }
3.26
hadoop_BalanceProcedure_nextProcedure_rdh
/** * Get the next procedure. */ public String nextProcedure() { return nextProcedure; }
3.26
hadoop_AbstractAuditSpanImpl_close_rdh
/** * Invoke {@link AuditSpan#deactivate()}. * This is final: subclasses MUST override the * {@code deactivate()} method. */ @Override public final void close() { deactivate(); }
3.26
hadoop_ProcessIdFileReader_getProcessId_rdh
/** * Get the process id from specified file path. * Parses each line to find a valid number * and returns the first one found. * * @return Process Id if obtained from path specified else null * @throws IOException */ public static String getProcessId(Path path) throws IOExcep...
3.26
hadoop_JobContextImpl_getJobConf_rdh
/** * Get the job Configuration * * @return JobConf */ public JobConf getJobConf() { return job; }
3.26
hadoop_JobContextImpl_getProgressible_rdh
/** * Get the progress mechanism for reporting progress. * * @return progress mechanism */ public Progressable getProgressible() {return progress; }
3.26
hadoop_AWSRequestAnalyzer_writing_rdh
/** * A write request of some form. * * @param verb * verb * @param key * object/prefix, etc. * @param size * nullable size * @return request info */ private RequestInfo writing(final String verb, final String key, final Number size) { return request(verb, true, key, size); }
3.26
hadoop_AWSRequestAnalyzer_request_rdh
/** * A request. * * @param verb * verb * @param mutating * does this update the store * @param key * object/prefix, etc. * @param size * nullable size * @return request info */ private RequestInfo request(final String verb, final boolean mutating, final String key, final Number size) { retur...
3.26
hadoop_AWSRequestAnalyzer_m0_rdh
/** * A read request. * * @param verb * verb * @param key * object/prefix, etc. * @param size * nullable size * @return request info */ private RequestInfo m0(final String verb, final String key, final Number size) {return request(verb, false, key, size); }
3.26
hadoop_AWSRequestAnalyzer_isRequestMultipartIO_rdh
/** * Predicate which returns true if the request is part of the * multipart upload API -and which therefore must be rejected * if multipart upload is disabled. * * @param request * request * @return true if the transfer manager creates them. */ public static boolean isRequestMultipartIO(final Object request)...
3.26
hadoop_AWSRequestAnalyzer_isRequestNotAlwaysInSpan_rdh
/** * Predicate which returns true if the request is of a kind which * could be outside a span because of how the AWS SDK generates them. * * @param request * request * @return true if the transfer manager creates them. */ public static boolean isRequestNotAlwaysInSpan(final Object request) {return ((request i...
3.26
hadoop_AWSRequestAnalyzer_analyze_rdh
/** * Given an AWS request, try to analyze it to operation, * read/write and path. * * @param request * request. * @return information about the request. */ public RequestInfo analyze(SdkRequest request) { // this is where Scala's case statement would massively // simplify life. // Ple...
3.26
hadoop_AbfsClientContextBuilder_build_rdh
/** * Build the context and get the instance with the properties selected. * * @return an instance of AbfsClientContext. */ public AbfsClientContext build() { // validate the values return new AbfsClientContext(exponentialRetryPolicy, abfsPerfTracker, abfsCounters); }
3.26
hadoop_AbfsClientThrottlingIntercept_updateMetrics_rdh
/** * Updates the metrics for successful and failed read and write operations. * * @param operationType * Only applicable for read and write operations. * @param abfsHttpOperation * Used for status code and data transferred. */ @Override public void updateMetrics(AbfsRestOperationType operationType, AbfsHtt...
3.26
hadoop_AbfsClientThrottlingIntercept_setAnalyzer_rdh
/** * Sets the analyzer for the intercept. * * @param name * Name of the analyzer. * @param abfsConfiguration * The configuration. * @return AbfsClientThrottlingAnalyzer instance. */ private AbfsClientThrottlingAnalyzer setAnalyzer(String name, AbfsConfiguration abfsConfiguration) { return new AbfsClien...
3.26
hadoop_AbfsClientThrottlingIntercept_initializeSingleton_rdh
/** * Creates a singleton object of the AbfsClientThrottlingIntercept. * which is shared across all filesystem instances. * * @param abfsConfiguration * configuration set. * @return singleton object of intercept. */ static AbfsClientThrottlingIntercept initializeSingleton(Ab...
3.26
hadoop_AbfsClientThrottlingIntercept_updateBytesTransferred_rdh
/** * Updates the metrics for the case when response code signifies throttling * but there are some expected bytes to be sent. * * @param isThrottledOperation * returns true if status code is HTTP_UNAVAILABLE * @param abfsHttpOperation * Used for status code and data transferred. * @return true if the opera...
3.26
hadoop_AbfsClientThrottlingIntercept_getWriteThrottler_rdh
/** * Returns the analyzer for write operations. * * @return AbfsClientThrottlingAnalyzer for write. */ AbfsClientThrottlingAnalyzer getWriteThrottler() { return writeThrottler;}
3.26
hadoop_AbfsClientThrottlingIntercept_getReadThrottler_rdh
/** * Returns the analyzer for read operations. * * @return AbfsClientThrottlingAnalyzer for read. */ AbfsClientThrottlingAnalyzer getReadThrottler() { return readThrottler; }
3.26
hadoop_AbfsClientThrottlingIntercept_sendingRequest_rdh
/** * Called before the request is sent. Client-side throttling * uses this to suspend the request, if necessary, to minimize errors and * maximize throughput. */ @Override public void sendingRequest(AbfsRestOperationType operationType, AbfsCounters abfsCounters) { switch (opera...
3.26
hadoop_RollingWindow_isStaleNow_rdh
/** * Check whether the last time that the bucket was updated is no longer * covered by rolling window. * * @param time * the current time * @return true if the bucket state is stale */ boolean isStaleNow(long time) { long utime = updateTime.get(); return (utime == (-1)) || ((time - utime) >= windowLe...
3.26
hadoop_RollingWindow_inc_rdh
/** * Increment the bucket. It assumes that staleness check is already * performed. We do not need to update the {@link #updateTime} because as * long as the {@link #updateTime} belongs to the current view of the * rolling window, the algorithm works fine. * * @param delta */ void inc(long delta) { value.add...
3.26
hadoop_RollingWindow_incAt_rdh
/** * When an event occurs at the specified time, this method reflects that in * the rolling window. * <p> * * @param time * the time at which the event occurred * @param delta * the delta that will be added to the window */ public void incAt(long time, long delta) { int bi = computeBucketIndex(time); ...
3.26
hadoop_RollingWindow_safeReset_rdh
/** * Safely reset the bucket state considering concurrent updates (inc) and * resets. * * @param time * the current time */ void safeReset(long time) { // At any point in time, only one thread is allowed to reset the // bucket synchronized(this) { if (isStaleNow(time)) { // res...
3.26
hadoop_RollingWindow_getSum_rdh
/** * Get value represented by this window at the specified time * <p> * * If time lags behind the latest update time, the new updates are still * included in the sum * * @param time * @return number of events occurred in the past period */ public long getSum(long time) { long sum = 0; for (Bucket buck...
3.26
hadoop_RouterView_preHead_rdh
/** * View for the Router Web UI. */public class RouterView extends TwoColumnLayout {@Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); setTitle("Router"); }
3.26
hadoop_StateStoreMetrics_setLocationCache_rdh
/** * set the count of the location cache access information. * * @param name * Name of the record. * @param count * count of the record. */ public void setLocationCache(String name, long count) { MutableGaugeLong counter = (...
3.26
hadoop_StateStoreMetrics_setCacheLoading_rdh
/** * Set the cache loading metrics for the state store interface. * * @param name * Name of the record of the cache. * @param value * The time duration interval as the cache value. */ public void setCacheLoading(String name, long value) { String cacheLoad = ("Cache" + name) + "Load"; MutableRate ...
3.26
hadoop_StateStoreMetrics_setCacheSize_rdh
/** * 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 v2 = cacheSizes.get(counterName); if...
3.26
hadoop_StateStoreMetrics_getCacheLoadMetrics_rdh
/** * Retrieve unmodifiable map of cache loading metrics. * * @return unmodifiable map of cache loading metrics. */ @VisibleForTesting public Map<String, MutableRate> getCacheLoadMetrics() { return Collections.unmodifiableMap(cacheLoadMetrics); }
3.26
hadoop_EntityColumn_getColumnQualifier_rdh
/** * * @return the column name value */ private String getColumnQualifier() { return columnQualifier; }
3.26
hadoop_FsServerDefaults_write_rdh
// ///////////////////////////////////////// // Writable // ///////////////////////////////////////// @Override @InterfaceAudience.Private public void write(DataOutput out) throws IOException { out.writeLong(blockSize); out.writeInt(bytesPerChecksum); out.writeInt(writePacketSize); out.writeShort(replication); out.writ...
3.26
hadoop_SCMStore_cleanResourceReferences_rdh
/** * Clean all resource references to a cache resource that contain application * ids pointing to finished applications. If the resource key does not exist, * do nothing. * * @param key * a unique identifier for a resource * @throws YarnException */ @Private public void cleanResourceReferences(String key) th...
3.26
hadoop_SCMStore_createAppCheckerService_rdh
/** * Create an instance of the AppChecker service via reflection based on the * {@link YarnConfiguration#SCM_APP_CHECKER_CLASS} parameter. * * @param conf * @return an instance of the AppChecker class */ @Private @SuppressWarnings("unchecked") public static AppChecker createAppCheckerService(Configuration conf) ...
3.26
hadoop_StageAllocatorLowCostAligned_numCanFit_rdh
// numCanFit() - returns the maximal number of requestedResources can be // allocated during the durationInterval without violating // capacity constraints public int numCanFit() { return gangsCanFit; }
3.26
hadoop_StageAllocatorLowCostAligned_canAllocate_rdh
// canAllocate() - boolean function, returns whether requestedResources // can be allocated during the durationInterval without // violating capacity constraints public boolean canAllocate() { return gangsCanFit > 0; }
3.26
hadoop_LocalCacheDirectoryManager_incrementFileCountForPath_rdh
/** * Increment the file count for a relative directory within the cache * * @param relPath * the relative path */ public synchronized void incrementFileCountForPath(String relPath) { relPath = (relPath == null) ? "" : relPath.trim(); Directory subDir = knownDirectories.get(relPath); if (subDir == nu...
3.26
hadoop_LocalCacheDirectoryManager_getCacheDirectoryRoot_rdh
/** * Given a path to a directory within a local cache tree return the * root of the cache directory. * * @param path * the directory within a cache directory * @return the local cache directory root or null if not found */public static Path getCacheDirectoryRoot(Path path) { while (path != null) { ...
3.26
hadoop_LocalCacheDirectoryManager_decrementFileCountForPath_rdh
/** * This method will reduce the file count for the directory represented by * path. The root directory of this Local cache directory manager is * represented by an empty string. */ public synchronized void decrementFileCountForPath(String relPath) { relPath = (relPath == null) ? "" : relPath.trim(); Dir...
3.26
hadoop_LocalCacheDirectoryManager_getRelativePathForLocalization_rdh
/** * This method will return relative path from the first available vacant * directory. * * @return {@link String} relative path for localization */ public synchronized String getRelativePathForLocalization() { if (nonFullDirectories.isEmpty()) { totalSubDirectori...
3.26
hadoop_SlowPeerTracker_isSlowPeerTrackerEnabled_rdh
/** * If SlowPeerTracker is enabled, return true, else returns false. * * @return true if slow peer tracking is enabled, else false. */ public boolean isSlowPeerTrackerEnabled() { return true; }
3.26
hadoop_SlowPeerTracker_getSlowNodes_rdh
/** * Returns all tracking slow peers. * * @param numNodes * @return */ public List<String> getSlowNodes(int numNodes) { Collection<SlowPeerJsonReport> jsonReports = getJsonReports(numNodes); ArrayList<String> slowNodes = new ArrayList<>(); for (SlowPeerJsonReport jsonReport : jsonReports) { slowNodes.add(jsonRepo...
3.26
hadoop_SlowPeerTracker_addReport_rdh
/** * Add a new report. DatanodeIds can be the DataNodeIds or addresses * We don't care as long as the caller is consistent. * * @param slowNode * DataNodeId of the peer suspected to be slow. * @param reportingNode * DataNodeId of the node reporting on its peer. * @param slowNodeMetrics * Aggregate laten...
3.26
hadoop_SlowPeerTracker_getReportsForNode_rdh
/** * Retrieve the non-expired reports that mark a given DataNode * as slow. Stale reports are excluded. * * @param slowNode * target node Id. * @return set of reports which implicate the target node as being slow. */ public Set<SlowPeerLatencyWithReportingNode> getReportsForNode(String slowNode) { final Concu...
3.26
hadoop_SlowPeerTracker_getJsonReports_rdh
/** * Retrieve reports in a structure for generating JSON, limiting the * output to the top numNodes nodes i.e nodes with the most reports. * * @param numNodes * number of nodes to return. This is to limit the * size of the generated JSON. */ private Collection<SlowPeerJsonReport> getJsonReports(int numNodes...
3.26
hadoop_SlowPeerTracker_filterNodeReports_rdh
/** * Filter the given reports to return just the valid ones. * * @param reports * Current set of reports. * @param now * Current time. * @return Set of valid reports that were created within last reportValidityMs millis. */ private SortedSet<SlowPeerLatencyWithReportingNode> filterNodeReports(ConcurrentMap...
3.26
hadoop_SlowPeerTracker_getReportsForAllDataNodes_rdh
/** * Retrieve all reports for all nodes. Stale reports are excluded. * * @return map from SlowNodeId {@literal ->} (set of nodes reporting peers). */ public Map<String, SortedSet<SlowPeerLatencyWithReportingNode>> getReportsForAllDataNodes() { if (allReports.isEmpty()) { return ImmutableMap.of(); } final Map<S...
3.26
hadoop_InternalOperations_rename_rdh
// rename w/ OVERWRITE @SuppressWarnings("deprecation") public void rename(FileSystem fs, final Path src, final Path dst, final Options... options) throws IOException { fs.rename(src, dst, options);}
3.26
hadoop_ShortWritable_hashCode_rdh
/** * hash code */ @Override public int hashCode() { return value; }
3.26
hadoop_ShortWritable_set_rdh
/** * Set the value of this ShortWritable. * * @param value * input value. */ public void set(short value) { this.value = value; }
3.26
hadoop_ShortWritable_toString_rdh
/** * Short values in string format */ @Override public String toString() { return Short.toString(value); }
3.26
hadoop_ShortWritable_write_rdh
/** * write short value */ @Override public void write(DataOutput out) throws IOException { out.writeShort(value); }
3.26
hadoop_ShortWritable_m0_rdh
/** * Compares two ShortWritable. */ @Overridepublic int m0(ShortWritable o) { short thisValue = this.value; short thatValue = o.value; return thisValue < thatValue ? -1 : thisValue == thatValue ? 0 : 1; }
3.26
hadoop_ShortWritable_readFields_rdh
/** * read the short value */ @Override public void readFields(DataInput in) throws IOException { value = in.readShort(); }
3.26
hadoop_ShortWritable_get_rdh
/** * * @return Return the value of this ShortWritable. */ public short get() { return value; }
3.26
hadoop_LocalTempDir_tempFile_rdh
/** * Create a temp file. * * @param conf * configuration to use when creating the allocator * @param prefix * filename prefix * @param size * file size, or -1 if not known * @return the temp file. The file has been created. * @throws IOException * IO failure */ public static File tempFile(Configura...
3.26
hadoop_LocalTempDir_tempPath_rdh
/** * Get a temporary path. * * @param conf * configuration to use when creating the allocator * @param prefix * filename prefix * @param size * file size, or -1 if not known * @return the temp path. * @throws IOException * IO failure */ public static Path tempPath(Configuration conf, String prefix,...
3.26
hadoop_HttpFSServerWebApp_get_rdh
/** * Returns HttpFSServer server singleton, configuration and services are * accessible through it. * * @return the HttpFSServer server singleton. */ public static HttpFSServerWebApp get() { return SERVER; }
3.26
hadoop_HttpFSServerWebApp_getAdminGroup_rdh
/** * Returns HttpFSServer admin group. * * @return httpfs admin group. */ public String getAdminGroup() { return adminGroup; }
3.26
hadoop_HttpFSServerWebApp_init_rdh
/** * Initializes the HttpFSServer server, loads configuration and required * services. * * @throws ServerException * thrown if HttpFSServer server could not be * initialized. */ @Override public void init() throws ServerException { if (SERVER != null) { throw new RuntimeException("HttpFSServer ...
3.26
hadoop_HttpFSServerWebApp_getMetrics_rdh
/** * gets the HttpFSServerMetrics instance. * * @return the HttpFSServerMetrics singleton. */ public static HttpFSServerMetrics getMetrics() { return metrics; }
3.26
hadoop_HttpFSServerWebApp_destroy_rdh
/** * Shutdowns all running services. */ @Override public void destroy() { SERVER = null; if (metrics != null) { metrics.shutdown(); } super.destroy(); }
3.26
hadoop_MultiSchemeDelegationTokenAuthenticationHandler_authenticate_rdh
/** * This method is overridden to restrict HTTP authentication schemes * available for delegation token management functionality. The * authentication schemes to be used for delegation token management are * configured using {@link DELEGATION_TOKEN_SCHEMES_PROPERTY} * * The basic logic here is to check if the cu...
3.26
hadoop_GetSubClusterPolicyConfigurationRequest_newInstance_rdh
/** * GetSubClusterPolicyConfigurationRequest is a request to the * {@code FederationPolicyStore} to get the configuration of a policy for a * given queue. */ @Private @Unstablepublic abstract class GetSubClusterPolicyConfigurationRequest { @Private @Unstable public static GetSubClusterPolicyConfigurati...
3.26