Package org.apache.hadoop.util
package org.apache.hadoop.util
Common utilities.
-
ClassDescriptionA
URLClassLoaderfor application isolation.This is a wrap class of a ReentrantLock.BasicDiskValidator is a wrapper aroundDiskChecker.This ExecutorService blocks the submission of new tasks when its queue is already full by using a semaphore.CacheableIPList loads a list of subnets from a file.Simplified List implementation which stores elements as a list of chunks, each chunk having a maximum size.Command-line utility for getting the full classpath needed to launch a Hadoop client application.sun.misc.Cleaner has moved in OpenJDK 9 and sun.misc.Unsafe#invokeCleaner(ByteBuffer) is the replacement.Pass in an implementation of this interface to cleanup ByteBuffers.A closeable object that maintains a reference count.Util class to stores ips/hosts/subnets.Generic implementation of version comparison.Configuration Helper class to provide advanced configuration parsing.This class validates configuration XML files in ${HADOOP_CONF_DIR} or specified ones.Utility for sampling and computing CPU usage.Encapsulates logic for composing multiple CRCs into one or more combined CRCs corresponding to concatenated underlying data ranges.This class provides utilities for working with CRCs.A thread that has calledThread.setDaemon(boolean)with true.Provide a factory for named daemon threads, for use in ExecutorServices constructorsThis class provides interface and utilities for processing checksums for DFS data transfers.The checksum typesA simple class for pooling direct ByteBuffers.Class that provides utility functions for checking disk problemA interface for disk validators.The factory class to create instance ofDiskValidator.A duration with logging of final state at info or debug in theclose()call.Get the exit code of an exception.Facilitates hooking process termination for tests, debugging and embedding.An exception raised when a call toExitUtil.terminate(int)was called and system exits were blocked.An exception raised when a call toExitUtil.terminate(int)was called and system halts were blocked.Fast thread-safe version of NumberFormatFileBasedIPList loads a list of subnets in CIDR format and ip addresses from a file.This entry point exists for diagnosing classloader problems: is a class or resource present -and if so, where?This class monitors the percentage of time the JVM is paused in GC within the specified observation window, say 1 minute.Encapsulates data about GC pauses measured at the specific timestamp.The user can provide an instance of a class implementing this interface when initializing a GcTimeMonitor to receive alerts when GC time percentage exceeds the specified threshold.GenericOptionsParseris a utility to parse command line arguments generic to the Hadoop framework.Contains utility methods for dealing with Java Generics.GSet<K,E extends K> AGSetis set, which supports theGSet.get(Object)operation.GSetByHashMap<K,E extends K> An implementation of the core algorithm of HeapSort.An atomic view of the included and excluded hostsHTTP utility class to help propagate server side exception to the client over HTTP as a JSON payload.IdentityHashStore<K,V> The IdentityHashStore stores (key, value) mappings in an array.Generic ID generator used for generating various types of number sequences.Interface for collections capable of being sorted byIndexedSorteralgorithms.Interface for sort algorithms acceptingIndexedSortableitems.This is a debugging class that can be used by callers to track whether a specific lock is being held for too long and periodically log a warning and stack trace, if so.Immutable class to capture a snapshot of suppressed log message stats.This is a wrap class of aReadLock.This is a wrap class of aReentrantReadWriteLock.This is a wrap class of aWriteLock.IntrusiveCollection<E extends IntrusiveCollection.Element>Implements an intrusive doubly-linked list.An element contained in this list.Thrown when bytesPerChecksun field in the meta file is less than or equal to 0 or type is invalid.Support for marshalling objects to and from JSON.Class which sets up a simple thread which runs in a loop sleeping for a short interval of time.Utils for KMS.Lambda-expression utilities be they generic or specific to Hadoop datatypes.LightWeightCache<K,E extends K> A low memory footprint Cache which extendsLightWeightGSet.Entries ofLightWeightCache.LightWeightGSet<K,E extends K> A low memory footprintGSetimplementation, which uses an array for storing the elements and linked lists for collision resolution.Elements ofLightWeightGSet.LightWeightResizableGSet<K,E extends K> A low memory footprintGSetimplementation, which uses an array for storing the elements and linked lists for collision resolution.Copied from guava source code v15 (LimitedInputStream) Guava deprecated LimitInputStream in v14 and removed it in v15.A class that provides a line reader from an input stream.Static utility methods pertaining toListinstances.Container class which holds a list of ip/host addresses and answers membership queries.InetAddressFactory is used to obtain InetAddress from host.An implementation of the core algorithm of MergeSort.A helper to load the native hadoop code i.e. libhadoop.so.Little duration counter.This class allows generic access to variable length type-safe parameter lists.This class replacesguava.Preconditionswhich provides helpers to validate the following conditions: An invalidnullobj causes aNullPointerException. An invalid argument causes anIllegalArgumentException. An invalid state causes anIllegalStateException. An invalid index causes anIndexOutOfBoundsException.A micro-application that prints the main class name out of a jar file.A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time.Process related utilities.A driver that is used to run programs added to itUtility to assist with generation of progress reports.A facility for reporting progress.A pure-java implementation of the CRC32 checksum that uses the same polynomial as the built-in native CRC32.A pure-java implementation of the CRC32 checksum that uses the CRC32-C polynomial, the same polynomial used by iSCSI and implemented on many Intel chipsets supporting SSE4.2.An implementation of the core algorithm of QuickSort.Minimal subset of google rate limiter class.Factory for Rate Limiting.ReadWriteDiskValidator is the class to check a directory by to create a file, write some bytes into it, read back, and verify if they are identical.The metrics for a directory generated byReadWriteDiskValidator.General reflection utilsRun a Hadoop job jar.This ExecutorService blocks the submission of new tasks when its queue is already full by using a semaphore.Sequential number generator.Service plug-in interface.Static utility methods pertaining toSetinstances.A base class for running a Shell command.This is an IOException with exit code added.A simple shell command executor.TheShutdownHookManagerenables running shutdownHook in a deterministic order, higher priority first.Helper class to shutdownThreads andExecutorServices.This class logs a message whenever we're about to exit on a UNIX signal.A simplified StopWatch implementation which can measure times in nanoseconds.Provides string interning utility methods.General string utilsThe traditional binary prefixes, kilo, mega, ..., exa, which can be represented by a 64-bit integer.Plugin to calculate resource information on the system.Plugin to calculate resource information on Linux systems.Plugin to calculate resource information on Windows systems.Utility methods for getting the time and computing intervals.Utility methods for getting the time and computing intervals.A tool interface that supports handling of generic command-line options.A utility to help runTools.This class returns build information about Hadoop components.A wrapper class to maven's ComparableVersion class, to comply with maven's version name string conventionWaitable<T>Represents an object that you can wait for.WeakReferenceMap<K,V> A map of keys type K to objects of type V which uses weak references, so does lot leak memory through long-lived references at the expense of losing references when GC takes place..General xml utilities.Utilities for working with ZooKeeper.An authentication token passed to ZooKeeper.addAuthInfo