name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hadoop_AuditingFunctions_withinAuditSpan_rdh
/** * Given a function, return a new function which * activates and deactivates the span around the inner one. * * @param auditSpan * audit span * @param operation * operation * @param <T> * Generics Type T. * @param <R> * Generics Type R. * @return a new invocation. */ public static <T, R> Functio...
3.26
hadoop_RegistryOperationsFactory_createAnonymousInstance_rdh
/** * Create and initialize an anonymous read/write registry operations instance. * In a secure cluster, this instance will only have read access to the * registry. * * @param conf * configuration * @return an anonymous registry operations instance * @throws ServiceStateException * on any failure to initia...
3.26
hadoop_RegistryOperationsFactory_createKerberosInstance_rdh
/** * Create a kerberos registry service client * * @param conf * configuration * @param jaasClientEntry * the name of the login config entry * @param principal * principal of the client. * @param keytab * location to the keytab file * @return a registry service client instance */ public static Regi...
3.26
hadoop_RegistryOperationsFactory_createAuthenticatedInstance_rdh
/** * Create and initialize an operations instance authenticated with write * access via an <code>id:password</code> pair. * * The instance will have the read access * across the registry, but write access only to that part of the registry * to which it has been give the relevant permissions. * * @param conf *...
3.26
hadoop_RegistryOperationsFactory_createInstance_rdh
/** * Create and initialize a registry operations instance. * Access writes will be determined from the configuration * * @param conf * configuration * @return a registry operations instance * @throws ServiceStateException * on any failure to initialize */ public static RegistryOperations createInstance(Co...
3.26
hadoop_AbstractConfigurableFederationPolicy_setPolicyInfo_rdh
/** * Setter method for the configuration weights. * * @param policyInfo * the {@link WeightedPolicyInfo} representing the policy * configuration. */ public void setPolicyInfo(WeightedPolicyInfo policyInfo) { this.policyInfo = policyInfo; }
3.26
hadoop_AbstractConfigurableFederationPolicy_getActiveSubclusters_rdh
/** * This methods gets active subclusters map from the {@code FederationStateStoreFacade} and validate it not being null/empty. * * @return the map of ids to info for all active subclusters. * @throws YarnException * if we can't get the list. */ protected Map<SubClusterId, SubClusterInfo> getActiveSubclusters(...
3.26
hadoop_AbstractConfigurableFederationPolicy_getPolicyContext_rdh
/** * Getter method for the {@link FederationPolicyInitializationContext}. * * @return the context for this policy. */ public FederationPolicyInitializationContext getPolicyContext() { return policyContext; }
3.26
hadoop_AbstractConfigurableFederationPolicy_getIsDirty_rdh
/** * Returns true whether the last reinitialization requires actual changes, or * was "free" as the weights have not changed. This is used by subclasses * overriding reinitialize and calling super.reinitialize() to know whether to * quit early. * * @return whether more work is needed to initialize. */public boo...
3.26
hadoop_AbstractConfigurableFederationPolicy_validate_rdh
/** * Overridable validation step for the policy configuration. * * @param newPolicyInfo * the configuration to test. * @throws FederationPolicyInitializationException * if the configuration is not * valid. */ public void validate(WeightedPolicyInfo newPolicyInfo) throws FederationPolicyInitializationExce...
3.26
hadoop_AbstractConfigurableFederationPolicy_setPolicyContext_rdh
/** * Setter method for the {@link FederationPolicyInitializationContext}. * * @param policyContext * the context to assign to this policy. */ public void setPolicyContext(FederationPolicyInitializationContext policyContext) { this.policyContext = policyContext; }
3.26
hadoop_MarshalledCredentialProvider_createCredentials_rdh
/** * Perform the binding, looking up the DT and parsing it. * * @return true if there were some credentials * @throws CredentialInitializationException * validation failure * @throws IOException * on a failure */ @Override protected AwsCredentials createCredentials(final Configuration config) throws IOExce...
3.26
hadoop_NamenodePriorityComparator_compareModDates_rdh
/** * Compare the modification dates. * * @param o1 * Context 1. * @param o2 * Context 2. * @return Comparison between dates. */ private int compareModDates(FederationNamenodeContext o1, FederationNamenodeContext o2) { // Reverse sort, lowest position is highest priority. return ((int) (o2.getDate...
3.26
hadoop_PathFinder_getAbsolutePath_rdh
/** * Returns the full path name of this file if it is listed in the path */ public File getAbsolutePath(String filename) {if (((pathenv == null) || (pathSep == null)) || (fileSep == null)) { return null; } int val = -1; String classvalue = pathenv + pathSep; while (((val = classvalue.ind...
3.26
hadoop_PathFinder_prependPathComponent_rdh
/** * Appends the specified component to the path list */ public void prependPathComponent(String str) {pathenv = (str + pathSep) + pathenv; }
3.26
hadoop_UnmanagedApplicationManager_finishApplicationMaster_rdh
/** * Unregisters from the resource manager and stops the request handler thread. * * @param request * the finishApplicationMaster request * @return the response * @throws YarnException * if finishAM call fails * @throws IOException * if finishAM call fails */ public FinishApplicationMasterResponse fini...
3.26
hadoop_UnmanagedApplicationManager_launchUAM_rdh
/** * Launch a new UAM in the resource manager. * * @return identifier uam identifier * @throws YarnException * if fails * @throws IOException * if fails */ public Token<AMRMTokenIdentifier> launchUAM() throws YarnException, IOException { this.connectionInitiated = true; // Blocking call to RM T...
3.26
hadoop_UnmanagedApplicationManager_monitorCurrentAppAttempt_rdh
/** * Monitor the submitted application and attempt until it reaches certain * states. * * @param appId * Application Id of application to be monitored * @param appStates * acceptable application state * @param attemptState * acceptable application attempt state * @return the application report * @thro...
3.26
hadoop_UnmanagedApplicationManager_getUAMToken_rdh
/** * Gets the amrmToken of the unmanaged AM. * * @return the amrmToken of the unmanaged AM. * @throws IOException * if getApplicationReport fails * @throws YarnException * if getApplicationReport fails */ protected Token<AMRMTokenIdentifier> getUAMToken() throws IOException, YarnException { Token<AMRMToken...
3.26
hadoop_UnmanagedApplicationManager_forceKillApplication_rdh
/** * Force kill the UAM. * * @return kill response * @throws IOException * if fails to create rmProxy * @throws YarnException * if force kill fails */ public KillApplicationResponse forceKillApplication() throws IOException, YarnException { shutDownConnections(); KillApplicationRequest request = Ki...
3.26
hadoop_UnmanagedApplicationManager_shutDownConnections_rdh
/** * Shutdown this UAM client, without killing the UAM in the YarnRM side. */ public void shutDownConnections() { this.heartbeatHandler.shutdown(); this.rmProxyRelayer.shutdown(); }
3.26
hadoop_UnmanagedApplicationManager_getAppId_rdh
/** * Returns the application id of the UAM. * * @return application id of the UAM */ public ApplicationId getAppId() { return this.applicationId; }
3.26
hadoop_UnmanagedApplicationManager_allocateAsync_rdh
/** * Sends the specified heart beat request to the resource manager and invokes * the callback asynchronously with the response. * * @param request * the allocate request * @param callback * the callback method for the request * @throws YarnException * if registerAM is not called yet */ public void all...
3.26
hadoop_UnmanagedApplicationManager_registerApplicationMaster_rdh
/** * Registers this {@link UnmanagedApplicationManager} with the resource * manager. * * @param request * RegisterApplicationMasterRequest * @return register response * @throws YarnException * if register fails * @throws IOException * if register fails */ public RegisterApplicationMasterResponse regi...
3.26
hadoop_UnmanagedApplicationManager_initializeUnmanagedAM_rdh
/** * Launch and initialize an unmanaged AM. First, it creates a new application * on the RM and negotiates a new attempt id. Then it waits for the RM * application attempt state to reach YarnApplicationAttemptState.LAUNCHED * after which it returns the AM-RM token. * * @param appId ...
3.26
hadoop_UnmanagedApplicationManager_m0_rdh
/** * Returns RM proxy for the specified protocol type. Unit test cases can * override this method and return mock proxy instances. * * @param protocol * protocol of the proxy * @param config * configuration * @param user * ugi for the proxy connection * @param token * token for the connection * @pa...
3.26
hadoop_UnmanagedApplicationManager_getAMRMClientRelayer_rdh
/** * Returns the rmProxy relayer of this UAM. * * @return rmProxy relayer of the UAM */ public AMRMClientRelayer getAMRMClientRelayer() { return this.rmProxyRelayer; }
3.26
hadoop_CacheStats_reserve_rdh
/** * Try to reserve more bytes. * * @param count * The number of bytes to add. We will round this up to the page * size. * @return The new number of usedBytes if we succeeded; -1 if we failed. */ long reserve(long count) { return usedBytesCount.reserve(count); }
3.26
hadoop_CacheStats_getCacheCapacity_rdh
/** * Get the maximum amount of bytes we can cache. This is a constant. */ public long getCacheCapacity() { return maxBytes; }
3.26
hadoop_CacheStats_roundUpPageSize_rdh
/** * Round up to the OS page size. */long roundUpPageSize(long count) { return usedBytesCount.f0.roundUp(count); }
3.26
hadoop_CacheStats_getPageSize_rdh
/** * Get the OS page size. * * @return the OS page size. */ long getPageSize() { return usedBytesCount.f0.osPageSize; }
3.26
hadoop_CacheStats_roundUp_rdh
/** * Round up a number to the operating system page size. */ public long roundUp(long count) { return ((count + osPageSize) - 1) & (~(osPageSize - 1)); }
3.26
hadoop_CacheStats_release_rdh
/** * Release some bytes that we're using. * * @param count * The number of bytes to release. We will round this up to the * page size. * @return The new number of usedBytes. */ long release(long count) { return usedBytesCount.release(count); }
3.26
hadoop_CacheStats_releaseRoundDown_rdh
/** * Release some bytes that we're using rounded down to the page size. * * @param count * The number of bytes to release. We will round this down to the * page size. * @return The new number of usedBytes. */ long releaseRoundDown(long count) { return usedBytesCount.releaseRoundDown(count); }
3.26
hadoop_CacheStats_roundDown_rdh
/** * Round down a number to the operating system page size. */ public long roundDown(long count) { return count & (~(osPageSize - 1)); }
3.26
hadoop_CacheStats_getCacheUsed_rdh
// Stats related methods for FSDatasetMBean /** * Get the approximate amount of cache space used. */ public long getCacheUsed() {return usedBytesCount.get(); }
3.26
hadoop_HsController_index_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#index() */ @Override public void index() { setTitle("JobHistory");}
3.26
hadoop_HsController_logs_rdh
/** * Render the logs page. */public void logs() { String logEntity = $(ENTITY_STRING); JobID jid = null; try { jid = JobID.forName(logEntity); set(JOB_ID, logEntity); requireJob(); } catch (Exception e) { // fall below } if (jid == null) { try { ...
3.26
hadoop_HsController_taskPage_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#taskPage() */ @Override protected Class<? extends View> taskPage() { return HsTaskPage.class; }
3.26
hadoop_HsController_nmlogs_rdh
/** * Render the nm logs page. */ public void nmlogs() { render(AggregatedLogsPage.class); }
3.26
hadoop_HsController_singleTaskCounter_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#singleTaskCounter() */ @Override public void singleTaskCounter() throws IOException { super.singleTaskCounter(); }
3.26
hadoop_HsController_singleJobCounter_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#singleJobCounter() */ @Override public void singleJobCounter() throws IOException { super.singleJobCounter(); }
3.26
hadoop_HsController_countersPage_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#countersPage() */ @Override public Class<? extends View> countersPage() { return HsCountersPage.class; }
3.26
hadoop_HsController_confPage_rdh
/** * * @return the page that will be used to render the /conf page */ @Override protected Class<? extends View> confPage() { return HsConfPage.class; }
3.26
hadoop_HsController_task_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#task() */ @Override public void task() { super.task(); }
3.26
hadoop_HsController_tasks_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#tasks() */ @Overridepublic void tasks() { super.tasks(); }
3.26
hadoop_HsController_singleCounterPage_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#singleCounterPage() */ @Override protected Class<? extends View> singleCounterPage() { return HsSingleCounterPage.class; }
3.26
hadoop_HsController_jobCounters_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#jobCounters() */ @Override public void jobCounters() { super.jobCounters(); }
3.26
hadoop_HsController_aboutPage_rdh
/** * * @return the page about the current server. */ protected Class<? extends View> aboutPage() { return HsAboutPage.class; }
3.26
hadoop_HsController_attempts_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#attempts() */ @Override public void attempts() { super.attempts(); }
3.26
hadoop_HsController_about_rdh
/** * Render a page about the current server. */ public void about() { render(aboutPage()); }
3.26
hadoop_HsController_attemptsPage_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#attemptsPage() */ @Override protected Class<? extends View> attemptsPage() { return HsAttemptsPage.class; }
3.26
hadoop_HsController_job_rdh
// Need all of these methods here also as Guice doesn't look into parent // classes. /* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#job() */ @Override public void job() { super.job(); }
3.26
hadoop_HsController_tasksPage_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#tasksPage() */ @Override protected Class<? extends View> tasksPage() { return HsTasksPage.class; }
3.26
hadoop_HsController_jobPage_rdh
/* (non-Javadoc) @see org.apache.hadoop.mapreduce.v2.app.webapp.AppController#jobPage() */ @Override protected Class<? extends View> jobPage() { return HsJobPage.class; }
3.26
hadoop_DockerKillCommand_setSignal_rdh
/** * Set the signal for the {@link DockerKillCommand}. * * @param signal * the signal to send to the container. * @return the {@link DockerKillCommand} with the signal set. */ public DockerKillCommand setSignal(String signal) { super.addCommandArguments("signal", signal); return this; }
3.26
hadoop_AbstractRESTRequestInterceptor_setConf_rdh
/** * Sets the {@link Configuration}. */ @Override public void setConf(Configuration conf) { this.conf = conf; if (this.nextInterceptor != null) { this.nextInterceptor.setConf(conf); } }
3.26
hadoop_AbstractRESTRequestInterceptor_getConf_rdh
/** * Gets the {@link Configuration}. */ @Override public Configuration getConf() { return this.conf; } /** * Initializes the {@link RESTRequestInterceptor}
3.26
hadoop_AbstractRESTRequestInterceptor_shutdown_rdh
/** * Disposes the {@link RESTRequestInterceptor}. */ @Override public void shutdown() { if (this.nextInterceptor != null) { this.nextInterceptor.shutdown(); } }
3.26
hadoop_AbstractRESTRequestInterceptor_getNextInterceptor_rdh
/** * Gets the next {@link RESTRequestInterceptor} in the chain. */ @Override public RESTRequestInterceptor getNextInterceptor() { return this.nextInterceptor; }
3.26
hadoop_AbstractRESTRequestInterceptor_setNextInterceptor_rdh
/** * Sets the {@link RESTRequestInterceptor} in the chain. */ @Override public void setNextInterceptor(RESTRequestInterceptor nextInterceptor) { this.nextInterceptor = nextInterceptor; }
3.26
hadoop_FlowRunCoprocessor_getCellTimestamp_rdh
/** * Determines if the current cell's timestamp is to be used or a new unique * cell timestamp is to be used. The reason this is done is to inadvertently * overwrite cells when writes come in very fast. But for metric cells, the * cell timestamp signifies the metric timestamp. Hence we don't want to * overwrite i...
3.26
hadoop_CMgrUpdateContainersEvent_getContainersToUpdate_rdh
/** * Get containers to update. * * @return List of containers to update. */ public List<Container> getContainersToUpdate() { return this.containersToUpdate; }
3.26
hadoop_GroupsService_getGroups_rdh
/** * * @deprecated use {@link #getGroupsSet(String user)} */ @Deprecated @Override public List<String> getGroups(String user) throws IOException { return hGroups.getGroups(user);}
3.26
hadoop_XMLParserMapper_map_rdh
/** * Read the input XML file line by line, and generate list of blocks. The * actual parsing logic is handled by {@link XMLParser}. This mapper just * delegates to that class and then writes the blocks to the corresponding * index to be processed by reducers. */ @Override public void map(LongWritable lineNum, Tex...
3.26
hadoop_FutureIO_awaitFuture_rdh
/** * Given a future, evaluate it. * <p> * Any exception generated in the future is * extracted and rethrown. * </p> * * @param future * future to evaluate * @param timeout * timeout to wait * @param unit * time unit. * @param <T> * type of the result. * @return the result, if all went well. * @...
3.26
hadoop_FutureIO_eval_rdh
/** * Evaluate a CallableRaisingIOE in the current thread, * converting IOEs to RTEs and propagating. * * @param callable * callable to invoke * @param <T> * Return type. * @return the evaluated result. * @throws UnsupportedOperationException * fail fast if unsupported * @throws IllegalArgumentExceptio...
3.26
hadoop_FutureIO_unwrapInnerException_rdh
/** * From the inner cause of an execution exception, extract the inner cause * to an IOException, raising RuntimeExceptions and Errors immediately. * <ol> * <li> If it is an IOE: Return.</li> * <li> If it is a {@link UncheckedIOException}: return the cause</li> * <li> Completion...
3.26
hadoop_FutureIO_propagateOptions_rdh
/** * Propagate options to any builder, converting everything with the * prefix to an option where, if there were 2+ dot-separated elements, * it is converted to a schema. * <pre> * fs.example.s3a.option becomes "s3a.option" * fs.example.fs.io.policy becomes "fs.io.policy" * fs.example.something becomes "s...
3.26
hadoop_FutureIO_raiseInnerCause_rdh
/** * Extract the cause of a completion failure and rethrow it if an IOE * or RTE. * * @param e * exception. * @param <T> * type of return value. * @return nothing, ever. * @throws IOException * either the inner IOException, or a wrapper around * any non-Runtime-Exception * @throws RuntimeException ...
3.26
hadoop_IOStatisticsSupport_retrieveIOStatistics_rdh
/** * Get the IOStatistics of the source, casting it * if it is of the relevant type, otherwise, * if it implements {@link IOStatisticsSource} * extracting the value. * * Returns null if the source isn't of the write type * or the return value of * {@link IOStatisticsSource#g...
3.26
hadoop_IOStatisticsSupport_snapshotIOStatistics_rdh
/** * Create a snapshot statistics instance ready to aggregate data. * * The instance can be serialized, and its * {@code toString()} method lists all the values. * * @return an empty snapshot */ public static IOStatisticsSnapshot snapshotIOStatistics() { return new IOStatisticsSnapshot(); }
3.26
hadoop_IOStatisticsSupport_m0_rdh
/** * Get a stub duration tracker. * * @return a stub tracker. */ public static DurationTracker m0() { return StubDurationTracker.STUB_DURATION_TRACKER; }
3.26
hadoop_IOStatisticsSupport_stubDurationTrackerFactory_rdh
/** * Return a stub duration tracker factory whose returned trackers * are always no-ops. * * As singletons are returned, this is very low-cost to use. * * @return a duration tracker factory. */ public static DurationTrackerFactory stubDurationTrackerFactory() { return StubDurationTrackerFactory.STUB_DURATIO...
3.26
hadoop_AppPlacementAllocator_getPreferredNodeIterator_rdh
/** * Get iterator of preferred node depends on requirement and/or availability. * * @param candidateNodeSet * input CandidateNodeSet * @return iterator of preferred node */ public Iterator<N> getPreferredNodeIterator(CandidateNodeSet<N> candidateNodeSet) { // Now only handle the case that single node in th...
3.26
hadoop_AppPlacementAllocator_initialize_rdh
/** * Initialize this allocator, this will be called by Factory automatically. * * @param appSchedulingInfo * appSchedulingInfo * @param schedulerRequestKey * schedulerRequestKey * @param rmContext * rmContext */ public void initialize(AppSchedulingInfo appSchedulingInfo, SchedulerRequestKey schedulerRe...
3.26
hadoop_WrappedFailoverProxyProvider_useLogicalURI_rdh
/** * Assume logical URI is used for old proxy provider implementations. */ @Override public boolean useLogicalURI() { return true; }
3.26
hadoop_WrappedFailoverProxyProvider_close_rdh
/** * Close the proxy, */ @Overridepublic synchronized void close() throws IOException { proxyProvider.close(); }
3.26
hadoop_EncryptionSecrets_getEncryptionMethod_rdh
/** * Get the encryption method. * * @return the encryption method */ public S3AEncryptionMethods getEncryptionMethod() { return encryptionMethod; }
3.26
hadoop_EncryptionSecrets_m0_rdh
/** * Init all state, including after any read. * * @throws IOException * error rebuilding state. */ private void m0() throws IOException {encryptionMethod = S3AEncryptionMethods.getMethod(encryptionAlgorithm); }
3.26
hadoop_EncryptionSecrets_toString_rdh
/** * String function returns the encryption mode but not any other * secrets. * * @return a string safe for logging. */ @Override public String toString() { return S3AEncryptionMethods.NONE.equals(encryptionMethod) ? "(no encryption)" : encryptionMethod.getMethod();}
3.26
hadoop_EncryptionSecrets_hasEncryptionAlgorithm_rdh
/** * Does this instance have encryption options? * That is: is the algorithm non-null. * * @return true if there's an encryption algorithm. */ public boolean hasEncryptionAlgorithm() { return StringUtils.isNotEmpty(encryptionAlgorithm); }
3.26
hadoop_EncryptionSecrets_hasEncryptionKey_rdh
/** * Does this instance have an encryption key? * * @return true if there's an encryption key. */ public boolean hasEncryptionKey() { return StringUtils.isNotEmpty(encryptionKey); }
3.26
hadoop_EncryptionSecrets_write_rdh
/** * Write out the encryption secrets. * * @param out * {@code DataOutput} to serialize this object into. * @throws IOException * IO failure */ @Override public void write(final DataOutput out) throws IOException { new LongWritable(serialVersionUID).write(out); Text.writeString(out, encryptionAlgori...
3.26
hadoop_EncryptionSecrets_readFields_rdh
/** * Read in from the writable stream. * After reading, call {@link #init()}. * * @param in * {@code DataInput} to deserialize this object from. * @throws IOException * failure to read/validate data. */ @Override public void readFields(final DataInput in) throws IOException { final LongWritable version...
3.26
hadoop_EncryptionSecrets_readObject_rdh
/** * For java serialization: read and then call {@link #init()}. * * @param in * input * @throws IOException * IO problem * @throws ClassNotFoundException * problem loading inner class. */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject...
3.26
hadoop_S3APrefetchingInputStream_available_rdh
/** * Returns the number of bytes available for reading without blocking. * * @return the number of bytes available for reading without blocking. * @throws IOException * if there is an IO error during this operation. */ @Override public synchronized int available() throws IOException { throwIfClosed(); ...
3.26
hadoop_S3APrefetchingInputStream_getS3AStreamStatistics_rdh
/** * Access the input stream statistics. * This is for internal testing and may be removed without warning. * * @return the statistics for this input stream */ @InterfaceAudience.Private @InterfaceStability.Unstable @VisibleForTesting public S3AInputStreamStatistics getS3AStreamStatistics() { if (!isClose...
3.26
hadoop_S3APrefetchingInputStream_setReadahead_rdh
/** * Sets the number of bytes to read ahead each time. * * @param readahead * the number of bytes to read ahead each time.. */ @Override public synchronized void setReadahead(Long readahead) { if (!isClosed()) { f0.setReadahead(readahead); } }
3.26
hadoop_S3APrefetchingInputStream_close_rdh
/** * Closes this stream and releases all acquired resources. * * @throws IOException * if there is an IO error during this operation. */ @Override public synchronized void close() throws IOException { if (f0 != null) { f0.close();f0 = null; super.close(); }}
3.26
hadoop_S3APrefetchingInputStream_read_rdh
/** * Reads up to {@code len} bytes from this stream and copies them into * the given {@code buffer} starting at the given {@code offset}. * Returns the number of bytes actually copied in to the given buffer. * * @param buffer * the buffer to copy data into. * @param offset * data is copied starting at this...
3.26
hadoop_S3APrefetchingInputStream_getIOStatistics_rdh
/** * Gets the internal IO statistics. * * @return the internal IO statistics. */ @Override public IOStatistics getIOStatistics() { if (!isClosed()) { ioStatistics = f0.getIOStatistics(); } return ioStatistics; }
3.26
hadoop_S3APrefetchingInputStream_seek_rdh
/** * Updates internal data such that the next read will take place at the given {@code pos}. * * @param pos * new read position. * @throws IOException * if there is an IO error during this operation. */ @Override public synchronized void seek(long pos) throws IOException { throwIfClosed(); f0.seek(...
3.26
hadoop_S3APrefetchingInputStream_hasCapability_rdh
/** * Indicates whether the given {@code capability} is supported by this stream. * * @param capability * the capability to check. * @return true if the given {@code capability} is supported by this stream, false otherwise. */ @Override public boolean hasCapability(String capability) { if (!isClosed()) { ...
3.26
hadoop_S3APrefetchingInputStream_getPos_rdh
/** * Gets the current position. If the underlying S3 input stream is closed, * it returns last read current position from the underlying steam. If the * current position was never read and the underlying input stream is closed, * this would return 0. * * @return the current position. * @throws IOException * ...
3.26
hadoop_NodeType_getIndex_rdh
/** * * @return the index of the node type */ public int getIndex() { return index;}
3.26
hadoop_FSEditLogAsync_logEdit_rdh
// return whether edit log wants to sync. boolean logEdit() { return log.doEditTransaction(op);}
3.26
hadoop_FSEditLogAsync_tryRelease_rdh
// while draining, count the releases until release(int) private void tryRelease(int permits) { pendingReleases.getAndAdd(permits); if (!draining.get()) { super.release(pendingReleases.getAndSet(0)); } }
3.26
hadoop_AbfsInputStream_getBytesFromRemoteRead_rdh
/** * Getter for bytes read remotely from the data store. * * @return value of the counter in long. */@VisibleForTesting public long getBytesFromRemoteRead() { return bytesFromRemoteRead; }
3.26
hadoop_AbfsInputStream_markSupported_rdh
/** * gets whether mark and reset are supported by {@code ADLFileInputStream}. Always returns false. * * @return always {@code false} */ @Override public boolean markSupported() { return false; }
3.26