name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hadoop_Utils_getMinor_rdh | /**
* Get the minor version.
*
* @return The minor version.
*/
public int getMinor() {
return minor;
} | 3.26 |
hadoop_Utils_readVInt_rdh | /**
* Decoding the variable-length integer. Synonymous to
* <code>(int)Utils#readVLong(in)</code>.
*
* @param in
* input stream
* @return the decoded integer
* @throws IOException
* raised on errors performing I/O.
* @see Utils#readVLong(DataInput)
*/
public static int readVInt(DataInput in) throws IOExce... | 3.26 |
hadoop_Utils_getMajor_rdh | /**
* Get the major version.
*
* @return Major version.
*/
public int getMajor() {return major;
} | 3.26 |
hadoop_Utils_readString_rdh | /**
* Read a String as a VInt n, followed by n Bytes in Text format.
*
* @param in
* The input stream.
* @return The string
* @throws IOException
* raised on errors performing I/O.
*/
public static String readString(DataInput in) throws IOException {
int length = readVInt(in);
if (length == (-1))
... | 3.26 |
hadoop_Utils_writeVLong_rdh | /**
* Encoding a Long integer into a variable-length encoding format.
* <ul>
* <li>if n in [-32, 127): encode in one byte with the actual value.
* Otherwise,
* <li>if n in [-20*2^8, 20*2^8): encode in two bytes: byte[0] = n/256 - 52;
* byte[1]=n&0xff. Otherwise,
* <li>if n IN [-16*2^16, 16*2^16): encode in t... | 3.26 |
hadoop_Utils_compareTo_rdh | /**
* Compare this version with another version.
*/
@Override
public int compareTo(Version that) {
if (major != that.major) {
return major - that.major;
}
return minor - that.minor;
} | 3.26 |
hadoop_Utils_writeString_rdh | /**
* Write a String as a VInt n, followed by n Bytes as in Text format.
*
* @param out
* out.
* @param s
* s.
* @throws IOException
* raised on errors performing I/O.
*/
public static void writeString(DataOutput out, String s) throws IOException {
if (s != null) {
Text text = new Text(s);
... | 3.26 |
hadoop_Utils_writeVInt_rdh | /**
* Encoding an integer into a variable-length encoding format. Synonymous to
* <code>Utils#writeVLong(out, n)</code>.
*
* @param out
* output stream
* @param n
* The integer to be encoded
* @throws IOException
* raised on errors performing I/O.
* @see Utils#writeVLong(DataOutput, long)
*/
public sta... | 3.26 |
hadoop_Utils_toString_rdh | /**
* Return a string representation of the version.
*/
@Override
public String toString() {
return new StringBuilder("v").append(major).append(".").append(minor).toString();
} | 3.26 |
hadoop_GetContainersResponsePBImpl_initLocalContainerList_rdh | // Once this is called. containerList will never be null - until a getProto
// is called.
private void initLocalContainerList() {
if (this.containerList != null) {
return;
}
GetContainersResponseProtoOrBuilder p = (viaProto) ? proto : builder;
List<ContainerReportProto> list = p.getContainersLis... | 3.26 |
hadoop_LocalJobOutputFiles_getInputFile_rdh | /**
* Return a local reduce input file created earlier
*
* @param mapId
* a map task id
*/
public Path getInputFile(int mapId) throws IOException {
return lDirAlloc.getLocalPathToRead(String.format(REDUCE_INPUT_FILE_FORMAT_STRING, f0, Integer.valueOf(mapId)), conf);
} | 3.26 |
hadoop_LocalJobOutputFiles_getOutputIndexFileForWrite_rdh | /**
* Create a local map output index file name.
*
* @param size
* the size of the file
*/
public Path getOutputIndexFileForWrite(long size) throws IOException {
String path = String.format(OUTPUT_FILE_INDEX_FORMAT_STRING, f0);
return lDirAlloc.getLocalPathForWrite(path, size, conf);
} | 3.26 |
hadoop_LocalJobOutputFiles_removeAll_rdh | /**
* Removes all of the files related to a task.
*/
public void removeAll() throws IOException {
conf.deleteLocalFiles(f0);
} | 3.26 |
hadoop_LocalJobOutputFiles_getInputFileForWrite_rdh | /**
* Create a local reduce input file name.
*
* @param mapId
* a map task id
* @param size
* the size of the file
*/
public Path getInputFileForWrite(TaskID mapId, long size, Configuration conf) throws IOException {
return lDirAlloc.getLocalPathForWrite(String.format(REDUCE_INPUT_FILE_FORMAT_STRING, f0,... | 3.26 |
hadoop_LocalJobOutputFiles_getOutputIndexFile_rdh | /**
* Return the path to a local map output index file created earlier
*/
public Path getOutputIndexFile() throws IOException {
String path = String.format(OUTPUT_FILE_INDEX_FORMAT_STRING, f0);
return lDirAlloc.getLocalPathToRead(path, conf);
} | 3.26 |
hadoop_LocalJobOutputFiles_getSpillIndexFileForWrite_rdh | /**
* Create a local map spill index file name.
*
* @param spillNumber
* the number
* @param size
* the size of the file
*/
public Path getSpillIndexFileForWrite(int spillNumber, long size) throws IOException {
String path = String.format(SPILL_INDEX_FILE_FORMAT_STRING, f0, spillNumber);
return lDirA... | 3.26 |
hadoop_LocalJobOutputFiles_getSpillIndexFile_rdh | /**
* Return a local map spill index file created earlier
*
* @param spillNumber
* the number
*/
public Path getSpillIndexFile(int spillNumber) throws IOException {
String path = String.format(SPILL_INDEX_FILE_FORMAT_STRING, f0, spillNumber);
return lDirAlloc.getLocalPathToRead(path, conf);
} | 3.26 |
hadoop_LocalJobOutputFiles_getSpillFileForWrite_rdh | /**
* Create a local map spill file name.
*
* @param spillNumber
* the number
* @param size
* the size of the file
*/
public Path getSpillFileForWrite(int spillNumber, long size) throws IOException {
String path = String.format(SPILL_FILE_FORMAT_STRING, f0, spillNumber);
return lDirAlloc.getLocalPat... | 3.26 |
hadoop_LocalJobOutputFiles_getOutputFileForWrite_rdh | /**
* Create a local map output file name.
*
* @param size
* the size of the file
*/
public Path getOutputFileForWrite(long size) throws IOException {
String path = String.format(OUTPUT_FILE_FORMAT_STRING, f0);
return lDirAlloc.getLocalPathForWrite(path, size, conf);
} | 3.26 |
hadoop_LocalJobOutputFiles_getSpillFile_rdh | /**
* Return a local map spill file created earlier.
*
* @param spillNumber
* the number
*/
public Path getSpillFile(int spillNumber) throws IOException {
String path = String.format(SPILL_FILE_FORMAT_STRING,
f0, spillNumber);
return lDirAlloc.getLocalPathToRead(path, conf);
} | 3.26 |
hadoop_LocalJobOutputFiles_getOutputFile_rdh | /**
* Return the path to local map output file created earlier
*/
public Path getOutputFile() throws IOException {
String path = String.format(OUTPUT_FILE_FORMAT_STRING, f0);
return lDirAlloc.getLocalPathToRead(path, conf);
} | 3.26 |
hadoop_ECChunk_getBuffer_rdh | /**
* Convert to ByteBuffer
*
* @return ByteBuffer
*/
public ByteBuffer getBuffer() {
return chunkBuffer;} | 3.26 |
hadoop_ECChunk_toBuffers_rdh | /**
* Convert an array of this chunks to an array of ByteBuffers
*
* @param chunks
* chunks to convert into buffers
* @return an array of ByteBuffers
*/
public static ByteBuffer[] toBuffers(ECChunk[] chunks) {
ByteBuffer[] buffers = new ByteBuffer[chunks.length];
ECChunk chunk;
for (int i = 0; i <... | 3.26 |
hadoop_ECChunk_toBytesArray_rdh | /**
* Convert to a bytes array, just for test usage.
*
* @return bytes array
*/
public byte[] toBytesArray() {byte[] bytesArr = new byte[chunkBuffer.remaining()];
// Avoid affecting the original one
chunkBuffer.mark();
chunkBuffer.get(bytesArr);
chunkBuffer.reset();
return bytesArr;
} | 3.26 |
hadoop_SubApplicationEntity_isSubApplicationEntity_rdh | /**
* Checks if the input TimelineEntity object is an SubApplicationEntity.
*
* @param te
* TimelineEntity object.
* @return true if input is an SubApplicationEntity, false otherwise
*/
public static boolean isSubApplicationEntity(TimelineEntity te) {
return (te != null) && (te instanceof SubApplicationEnt... | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_toString_rdh | /**
* String operator describes all the current statistics.
* <b>Important: there are no guarantees as to the stability
* of this value.</b>
*
* @return the current values of the stream statistics.
*/
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("StreamStatistics{");
... | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_readAheadBytesRead_rdh | /**
* Total bytes read from readAhead buffer during a read operation.
*
* @param bytes
* the bytes to be incremented.
*/
@Overridepublic void readAheadBytesRead(long bytes) {
ioStatisticsStore.incrementCounter(StreamStatisticNames.READ_AHEAD_BYTES_READ, bytes);
} | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_remoteReadOperation_rdh | /**
* {@inheritDoc }
*
* Increment the counter when a remote read operation occurs.
*/@Override
public void remoteReadOperation() {
ioStatisticsStore.incrementCounter(StreamStatisticNames.REMOTE_READ_OP);
} | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_seekBackwards_rdh | /**
* Seek backwards, incrementing the seek and backward seek counters.
*
* @param negativeOffset
* how far was the seek?
* This is expected to be negative.
*/
@Override
public void seekBackwards(long negativeOffset) {
seekOps.incrementAndGet();
ioStatisticsStore.incrementCounter(StreamStatisticName... | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_readOperationStarted_rdh | /**
* A {@code read(byte[] buf, int off, int len)} operation has started.
*/
@Override
public void readOperationStarted() {readOps.incrementAndGet();
} | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_bytesReadFromBuffer_rdh | /**
* {@inheritDoc }
*
* Total bytes read from the buffer.
*
* @param bytes
* number of bytes that are read from buffer.
*/
@Override
public void bytesReadFromBuffer(long bytes) {
ioStatisticsStore.incrementCounter(StreamStatisticNames.BYTES_READ_BUFFER, bytes);
}
/**
* {@inheritDoc } | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_seek_rdh | /**
* Record a forward or backward seek, adding a seek operation, a forward or
* a backward seek operation, and number of bytes skipped.
* The seek direction will be calculated based on the parameters.
*
* @param seekTo
* seek to the position.
* @param currentPos
* current position.
*/
@Override
public voi... | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_remoteBytesRead_rdh | /**
* Total bytes read remotely after nothing was read from readAhead buffer.
*
* @param bytes
* the bytes to be incremented.
*/
@Override
public void remoteBytesRead(long bytes) {
ioStatisticsStore.incrementCounter(StreamStatisticNames.REMOTE_BYTES_READ, bytes);
} | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_bytesRead_rdh | /**
* Increment the bytes read counter by the number of bytes;
* no-op if the argument is negative.
*
* @param bytes
* number of bytes read.
*/
@Override
public void bytesRead(long bytes) {
bytesRead.addAndGet(bytes);
} | 3.26 |
hadoop_AbfsInputStreamStatisticsImpl_getActionHttpGetRequest_rdh | /**
* Getter for the mean value of the time taken to complete a HTTP GET
* request by AbfsInputStream.
*
* @return mean value.
*/
@VisibleForTesting
public double getActionHttpGetRequest() {
return ioStatisticsStore.meanStatistics().get(ACTION_HTTP_GET_REQUEST + SUFFIX_MEAN).mean();
} | 3.26 |
hadoop_ConsumerRaisingIOE_andThen_rdh | /**
* after calling {@link #accept(Object)},
* invoke the next consumer in the chain.
*
* @param next
* next consumer
* @return the chain.
*/
default ConsumerRaisingIOE<T> andThen(ConsumerRaisingIOE<? super T> next) {
return
(T t) -> {
accept(t);
next.accept(t);
};
} | 3.26 |
hadoop_ApplicationReportSerDeser_toString_rdh | /**
* Convert an instance to a JSON string -sync access to a shared ser/deser
* object instance
*
* @param instance
* object to convert
* @return a JSON string description
* @throws JsonProcessingException
* parse problems
*/
public static String toString(SerializedApplicationReport instance) throws JsonPr... | 3.26 |
hadoop_EmptyS3AStatisticsContext_m0_rdh | /**
* Always return the stub duration tracker.
*
* @param key
* statistic key prefix
* @param count
* #of times to increment the matching counter in this
* operation.
* @return stub tracker.
... | 3.26 |
hadoop_RpcNoSuchProtocolException_getRpcStatusProto_rdh | /**
* get the rpc status corresponding to this exception
*/
public RpcStatusProto getRpcStatusProto() {
return RpcStatusProto.ERROR;
} | 3.26 |
hadoop_RpcNoSuchProtocolException_getRpcErrorCodeProto_rdh | /**
* get the detailed rpc status corresponding to this exception
*/
public RpcErrorCodeProto getRpcErrorCodeProto() {
return RpcErrorCodeProto.ERROR_NO_SUCH_PROTOCOL;
} | 3.26 |
hadoop_GPGPolicyFacade_setPolicyManager_rdh | /**
* Provides a utility for the policy generator to write a policy manager
* into the FederationStateStore. The facade keeps a cache and will only write
* into the FederationStateStore if the policy configuration has changed.
*
* @param policyManager
* The policy manager we want to update into the state
* s... | 3.26 |
hadoop_GPGPolicyFacade_confCacheEqual_rdh | /**
*
* @param queue
* the queue to check the cached policy configuration for
* @param conf
* the new policy configuration
* @return whether or not the conf is equal to the cached conf
*/
private boolean confCacheEqual(String queue, SubClusterPolicyConfiguration conf) {
... | 3.26 |
hadoop_GPGPolicyFacade_getPolicyManager_rdh | /**
* Provides a utility for the policy generator to read the policy manager
* from the FederationStateStore. Because the policy generator should be the
* only component updating the policy, this implementation does not use the
* reinitialization feature.
*
* @param queueName
* the name of the queue we want th... | 3.26 |
hadoop_BoundedRangeFileInputStream_skip_rdh | /* We may skip beyond the end of the file. */
@Override
public long skip(long n) throws IOException {
long len = Math.min(n, end - pos);
pos += len;
return len;
} | 3.26 |
hadoop_FilePool_getInputFiles_rdh | /**
* Gather a collection of files at least as large as minSize.
*
* @return The total size of files returned.
*/
public long getInputFiles(long minSize, Collection<FileStatus> files) throws IOException {
updateLock.readLock().lock();
try {
return root.selectFiles(minSize, files);
} finally {
updateLock.r... | 3.26 |
hadoop_FilePool_refresh_rdh | /**
* (Re)generate cache of input FileStatus objects.
*/
public void refresh() throws IOException {
updateLock.writeLock().lock();try {
root = new InnerDesc(fs, fs.getFileStatus(path), new MinFileFilter(conf.getLong(GRIDMIX_MIN_FILE, (128 * 1024) * 1024), conf.getLong(GRIDMIX_MAX_TOTAL, 100L * (1L << 40))))... | 3.26 |
hadoop_FilePool_locationsFor_rdh | /**
* Get a set of locations for the given file.
*/
public BlockLocation[] locationsFor(FileStatus stat, long start, long len) throws IOException {
// TODO cache
return fs.getFileBlockLocations(stat, start, len);
} | 3.26 |
hadoop_GangliaMetricVisitor_getType_rdh | /**
*
* @return the type of a visited metric
*/
String getType() {
return type;
} | 3.26 |
hadoop_RegistryPathUtils_encodeForRegistry_rdh | /**
* Perform any formatting for the registry needed to convert
* non-simple-DNS elements
*
* @param element
* element to encode
* @return an encoded string
*/
public static String encodeForRegistry(String element) {
return IDN.toASCII(element);
} | 3.26 |
hadoop_RegistryPathUtils_createFullPath_rdh | /**
* Create a full path from the registry root and the supplied subdir
*
* @param path
* path of operation
* @return an absolute path
* @throws InvalidPathnameException
* if the path is invalid
*/
public static String createFullPath(String base, String path) throws InvalidPathnameException {
Preconditi... | 3.26 |
hadoop_RegistryPathUtils_split_rdh | /**
* split a path into elements, stripping empty elements
*
* @param path
* the path
* @return the split path
*/
public static List<String> split(String path) {
//
String[] pathelements = path.split("/");
List<String> dirs = new ArrayList<String>(pathelements.length);
for (String pathelement :... | 3.26 |
hadoop_RegistryPathUtils_validateZKPath_rdh | /**
* Validate ZK path with the path itself included in
* the exception text
*
* @param path
* path to validate
* @return the path parameter
* @throws InvalidPathnameException
* if the pathname is invalid.
*/
public static String validateZKPath(String path) throws InvalidPathnameException {
try {
... | 3.26 |
hadoop_RegistryPathUtils_parentOf_rdh | /**
* Get the parent of a path
*
* @param path
* path to look at
* @return the parent path
* @throws PathNotFoundException
* if the path was at root.
*/
public static String parentOf(String path) throws PathNotFoundException {
List<String> elements = split(path);
int v9 = elements.size();
if (... | 3.26 |
hadoop_RegistryPathUtils_validateElementsAsDNS_rdh | /**
* Validate ZK path as valid for a DNS hostname.
*
* @param path
* path to validate
* @return the path parameter
* @throws InvalidPathnameException
* if the pathname is invalid.
*/
public static String validateElementsAsDNS(S... | 3.26 |
hadoop_RegistryPathUtils_encodeYarnID_rdh | /**
* Perform whatever transforms are needed to get a YARN ID into
* a DNS-compatible name
*
* @param yarnId
* ID as string of YARN application, instance or container
* @return a string suitable for use in registry paths.
*/
public static String encodeYarnID(String yarnId) {
return yarnId.replace("containe... | 3.26 |
hadoop_RegistryPathUtils_lastPathEntry_rdh | /**
* Get the last entry in a path; for an empty path
* returns "". The split logic is that of
* {@link #split(String)}
*
* @param path
* path of operation
* @return the last path entry or "" if none.
*/
public static String lastPathEntry(String path) {
List<String> splits = split(path);
if (splits.is... | 3.26 |
hadoop_RegistryPathUtils_join_rdh | /**
* Join two paths, guaranteeing that there will not be exactly
* one separator between the two, and exactly one at the front
* of the path. There will be no trailing "/" except for the special
* case that this is the root path
*
* @param base
* base path
* @param path
* second path to add
* @return a c... | 3.26 |
hadoop_ByteBufferPool_release_rdh | /**
* Clear the buffer pool thus releasing all the buffers.
*/
default void release() {
} | 3.26 |
hadoop_ApplicationColumn_getColumnQualifier_rdh | /**
*
* @return the column name value
*/
private String getColumnQualifier() {
return columnQualifier;
} | 3.26 |
hadoop_QueueResourceQuotas_getEffectiveMinResource_rdh | /* Effective Minimum Resource */
public Resource getEffectiveMinResource() {
return _get(NL, ResourceType.EFF_MIN_RESOURCE);
} | 3.26 |
hadoop_QueueResourceQuotas_getConfiguredMinResource_rdh | /* Configured Minimum Resource */
public Resource getConfiguredMinResource() {
return _get(NL, ResourceType.MIN_RESOURCE);
} | 3.26 |
hadoop_QueueResourceQuotas_getConfiguredMaxResource_rdh | /* Configured Maximum Resource */
public Resource getConfiguredMaxResource() {
return getConfiguredMaxResource(NL);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_beforeExecution_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void beforeExecution(Context.BeforeExecution context, ExecutionAttributes executionAttributes) {
span.beforeExecution(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_beforeMarshalling_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void beforeMarshalling(Context.BeforeMarshalling context, ExecutionAttributes executionAttributes) {
span.beforeMarshalling(context, executionAttributes);} | 3.26 |
hadoop_ActiveAuditManagerS3A_getActiveAuditSpan_rdh | /**
* Return the active wrapped span.
*
* @return a span.
*/
@Override
public AuditSpanS3A getActiveAuditSpan() {
return activeSpan();
} | 3.26 |
hadoop_ActiveAuditManagerS3A_afterTransmission_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void afterTransmission(Context.AfterTransmission context, ExecutionAttributes
executionAttributes) {
span.afterTransmission(context, executionAttributes);} | 3.26 |
hadoop_ActiveAuditManagerS3A_setActiveThreadSpan_rdh | /**
* Set a specific span as the active span.
* This will wrap it.
*
* @param span
* span to use.
* @return the wrapped span.
*/
private AuditSpanS3A setActiveThreadSpan(AuditSpanS3A span) {
return switchToActiveSpan(new WrappingAuditSpan(span, span.isValidSpan()));
} | 3.26 |
hadoop_ActiveAuditManagerS3A_activeSpan_rdh | /**
* Get the active span.
* This is the wrapped span, not the inner one, and it is
* of that type.
*
* @return the active WrappingAuditSpan
*/
private WrappingAuditSpan activeSpan() {
return
activeSpanMap.getForCurrentThread();
} | 3.26 |
hadoop_ActiveAuditManagerS3A_switchToActiveSpan_rdh | /**
* Switch to a given span. If it is null, use the
* unbounded span.
*
* @param span
* to switch to; may be null
* @return the span switched to
*/
private WrappingAuditSpan switchToActiveSpan(WrappingAuditSpan span) {
if ((span != null)
&& span.isValidSpan()) {
activeSpanMap.setForCurrentThread(span);
}... | 3.26 |
hadoop_ActiveAuditManagerS3A_set_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void set(final String key, final String value) {span.set(key, value);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_modifyRequest_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/@Override
public SdkRequest modifyRequest(Context.ModifyRequest context, ExecutionAttributes executionAttributes) {
return span.modifyRequest(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_modifyResponse_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public SdkResponse modifyResponse(Context.ModifyResponse context, ExecutionAttributes executionAttributes) {
return span.modifyResponse(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_activate_rdh | /**
* Makes this the thread's active span and activate.
* If the span was already active: no-op.
*/
@Override
public AuditSpanS3A activate() {
if (!isActive()) {
switchToActiveSpan(this);
span.activate();
}
return this;
} | 3.26 |
hadoop_ActiveAuditManagerS3A_afterMarshalling_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void afterMarshalling(Context.AfterMarshalling context, ExecutionAttributes executionAttributes) {
span.afterMarshalling(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_modifyHttpRequest_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public SdkHttpRequest modifyHttpRequest(Context.ModifyHttpRequest context, ExecutionAttributes executionAttributes) {
return span.modifyHttpRequest(context, executionAttributes);
}
/**
* Forward to the inner span.
* {@inheritDoc } | 3.26 |
hadoop_ActiveAuditManagerS3A_afterUnmarshalling_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void afterUnmarshalling(Context.AfterUnmarshalling context, ExecutionAttributes executionAttributes) {
span.afterUnmarshalling(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_extractAndActivateSpanFromRequest_rdh | /**
* Get the active span from the execution attributes,
* falling back to the active thread span if there
* is nothing in the attributes.
* Provided the span is a wrapped span, the span is
* activated.
*
* @param request
* request
* @param executionAttributes
* the execution attributes
* @return the act... | 3.26 |
hadoop_ActiveAuditManagerS3A_createExecutionInterceptors_rdh | /**
* Return a list of execution interceptors for the AWS SDK which
* relays to this class.
*
* @return a list of execution interceptors.
*/
@Override
public List<ExecutionInterceptor> createExecutionInterceptors() throws IOException
{
// wire up the AWS SDK To call back... | 3.26 |
hadoop_ActiveAuditManagerS3A_isValidSpan_rdh | /**
* This span is valid if the span isn't closed and the inner
* span is valid.
*
* @return true if the span is considered valid.
*/
@Override
public boolean isValidSpan() {
return isValid && span.isValidSpan();
} | 3.26 |
hadoop_ActiveAuditManagerS3A_getUnbondedSpan_rdh | /**
* Get the unbounded span. Until this manager
* is fully initialized it will return the no-op
* span.
*
* @return the unbounded span.
*/
private WrappingAuditSpan getUnbondedSpan() {
return unbondedSpan;
} | 3.26 |
hadoop_ActiveAuditManagerS3A_isActive_rdh | /**
* Is the span active?
*
* @return true if this span is the active one for the current thread.
*/
private boolean isActive() {
return this == getActiveAuditSpan();
} | 3.26 |
hadoop_ActiveAuditManagerS3A_serviceStart_rdh | /**
* After starting the auditor, it is queried for its
* unbonded span, which is then wrapped and stored for
* use.
*/
@Override
protected void serviceStart() throws Exception
{
super.serviceStart();
setUnbondedSpan(new WrappingAuditSpan(auditor.getUnbondedSpan(), false));
LOG.debug("Started audit serv... | 3.26 |
hadoop_ActiveAuditManagerS3A_onExecutionFailure_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void onExecutionFailure(Context.FailedExecution context, ExecutionAttributes executionAttributes) {
span.onExecutionFailure(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_getActiveSpanMap_rdh | /**
* Get the map of threads to active spans; allows
* for testing of weak reference resolution after GC.
*
* @return the span map
*/
@VisibleForTesting
WeakReferenceThreadMap<WrappingAuditSpan> getActiveSpanMap() {
return activeSpanMap;
} | 3.26 |
hadoop_ActiveAuditManagerS3A_noteSpanReferenceLost_rdh | /**
* Span reference lost from GC operations.
* This is only called when an attempt is made to retrieve on
* the active thread or when a prune operation is cleaning up.
*
* @param threadId
* thread ID.
*/
private void noteSpanReferenceLost(long threadId) {
auditor.noteSpanReferenceLost(threadId);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_setUnbondedSpan_rdh | /**
* Set the unbonded span.
*
* @param unbondedSpan
* the new unbonded span
*/
private void setUnbondedSpan(final WrappingAuditSpan unbondedSpan) {
this.unbondedSpan = unbondedSpan;
} | 3.26 |
hadoop_ActiveAuditManagerS3A_modifyHttpResponse_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public SdkHttpResponse modifyHttpResponse(Context.ModifyHttpResponse context, ExecutionAttributes executionAttributes) {
return span.modifyHttpResponse(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_afterExecution_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void afterExecution(Context.AfterExecution context, ExecutionAttributes executionAttributes) {
span.afterExecution(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_getSpanId_rdh | /**
* The Span ID in the audit manager is the ID of the auditor,
* which can be used in the filesystem toString() method
* to assist in correlating client logs with S3 logs.
* It is returned here as part of the implementation of
* {@link AWSAuditEventCallbacks}.
*
* @return the unique ID of the FS.
*/
@Override... | 3.26 |
hadoop_ActiveAuditManagerS3A_deactivate_rdh | /**
* Switch to the unbounded span and then deactivate this span.
* No-op for invalid spans,
* so as to prevent the unbounded span from being closed
* and everything getting very confused.
*/
@Override
public void deactivate() {
// span is inactive; ignore
if (!isActive()) {
return;
}
// skipped for invalid spans,... | 3.26 |
hadoop_ActiveAuditManagerS3A_beforeUnmarshalling_rdh | /**
* Forward to the inner span.
* {@inheritDoc }
*/
@Override
public void beforeUnmarshalling(Context.BeforeUnmarshalling context, ExecutionAttributes executionAttributes) {
span.beforeUnmarshalling(context, executionAttributes);
} | 3.26 |
hadoop_ActiveAuditManagerS3A_requestCreated_rdh | /**
* Audit the creation of a request and retrieve
* a reference to the active thread span.
*/
@Override
public void requestCreated(final SdkRequest.Builder builder) {
AuditSpanS3A span = getActiveAuditSpan();
if (LOG.isTraceEnabled()) {
LOG.trace("Created Request {} in span {}", analyzer.analyze(builder.build()), s... | 3.26 |
hadoop_ActiveAuditManagerS3A_prune_rdh | /**
* Prune all null weak references, calling the referenceLost
* callback for each one.
*
* non-atomic and non-blocking.
*
* @return the number of entries pruned.
*/
@VisibleForTesting
int prune() {
return activeSpanMap.prune();
} | 3.26 |
hadoop_RouterResolver_getSubclusterMapping_rdh | /**
* Get subcluster mapping info.
*
* @return The map of subcluster info.
*/
protected Map<K,
V> getSubclusterMapping() {
return this.subclusterMapping;
} | 3.26 |
hadoop_RouterResolver_getRpcServer_rdh | /**
* Get the Router RPC server.
*
* @return Router RPC server. Null if not possible.
*/
protected RouterRpcServer getRpcServer() {
if (this.router == null) {
return null;
}
return router.getRpcServer();
} | 3.26 |
hadoop_RouterResolver_updateSubclusterMapping_rdh | /**
* Update <NamespaceId, Subcluster Info> mapping info periodically.
*/
private synchronized void updateSubclusterMapping() {
if ((subclusterMapping == null) || ((monotonicNow() - lastUpdated) > minUpdateTime)) {
// Fetch the mapping asynchronously
Thread updater = new Thread(new Runnable()
... | 3.26 |
hadoop_HAServiceTarget_supportObserver_rdh | /**
*
* @return true if this target supports the Observer state, false otherwise.
*/
public boolean supportObserver() {
return false;
} | 3.26 |
hadoop_HAServiceTarget_getProxy_rdh | /**
*
* @return a proxy to connect to the target HA Service.
* @param timeoutMs
* timeout in milliseconds.
* @param conf
* Configuration.
* @throws IOException
* raised on errors performing I/O.
*/
public HAServiceProtocol getProxy(Configuration conf, int timeoutMs) throws IOException {
return
ge... | 3.26 |
hadoop_HAServiceTarget_getHealthMonitorProxy_rdh | /**
* Returns a proxy to connect to the target HA service for health monitoring.
* If {@link #getHealthMonitorAddress()} is implemented to return a non-null
* address, then this proxy will connect to that address. Otherwise, the
* returned proxy defaults to using {@link #getAddress()}, which means this
* method's... | 3.26 |
hadoop_HAServiceTarget_isAutoFailoverEnabled_rdh | /**
*
* @return true if auto failover should be considered enabled
*/
public boolean isAutoFailoverEnabled() {
return false;
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.