Package org.apache.hadoop.hbase.util
package org.apache.hadoop.hbase.util
-
ClassDescriptionAn abstract implementation of the ByteRange APITypical base class for file status filter.Common base class used for HBase command-line tools.Extends the basic
SimpleByteRange
implementation with position support.Utility for network addresses, resolving and naming.Interface for AddressSelectionCondition to check if address is acceptableUtilities related to atomic operations.Helper class that allows to create and manipulate an AvlTree.AvlUtil.AvlInsertOrReplace<TNode extends AvlUtil.AvlNode>Helper class that allows to create and manipulate a linked list of AvlLinkedNodesAvlUtil.AvlKeyComparator<TNode extends AvlUtil.AvlNode>The AvlTree allows to lookup an object using a custom key.AvlUtil.AvlLinkedNode<TNode extends AvlUtil.AvlLinkedNode>This class extends the AvlNode and adds two links that will be used in conjunction with the AvlIterableList class.AvlUtil.AvlNode<TNode extends AvlUtil.AvlNode>This class represent a node that will be used in an AvlTree.AvlUtil.AvlNodeVisitor<TNode extends AvlUtil.AvlNode>Visitor that allows to traverse a set of AvlNodes.Helper class that allows to create and manipulate an AVL TreeAvlUtil.AvlTreeIterator<TNode extends AvlUtil.AvlNode>Iterator for the AvlTreeThe bloom context that is used by the StorefileWriter to add the bloom details per cellImplements a Bloom filter, as defined by Bloom in 1970.Common methods Bloom filter methods required at read and write time.The basic building block for theCompoundBloomFilter
Handles Bloom filter initialization based on configuration and serialized metadata in the reader and writer ofHStoreFile
.Utility methods related to BloomFiltersSpecifies methods needed to add elements to a Bloom filter and serialize the resulting Bloom filter as a sequence of bytes.A completion service, close to the one available in the JDK 1.7 However, this ones keeps the list of the future, and allows to cancel them all.A generic bounded blocking Priority-Queue.Defines the way the ByteBuffers are createdThis class manages an array of ByteBuffers with a default size 4MB.Deprecated.This class will become IA.Private in HBase 3.0.Lightweight, reusable class for specifying ranges of byte[]'s.Utility methods for working withByteRange
.Utility class that handles byte arrays, conversions to/from other types, comparisons, hash code generation, manufacturing keys for HashMaps or HashSets, and can be used as key in maps or trees.Byte array comparator class.Provides a lexicographical comparer implementation; either a Java implementation or a faster implementation based onUnsafe
.ABytes.ByteArrayComparator
that treats the empty array as the largest value.Similar interface asProgressable
but returns a boolean to support canceling the operation.Extracts the byte for the hash calculation from the given cellChecksum types.Utilities for class manipulation.Base class loader that defines couple shared constants used by sub-classes.Class for determining the "size" of a class, an attempt to calculate the actual bytes that an object of this class will occupy in memory The core of this class is taken from the Derby projectMemoryLayout abstracts details about the JVM object layout.UnsafeLayout uses Unsafe to guesstimate the object-layout related parameters like object header sizes and oop sizes See HBASE-15950.Common Utility class for clientsUtility scanner that wraps a sortable collection and serves as a KeyValueScanner.Deprecated.Since 2.0.6/2.1.3/2.2.0Utility methods for interacting with the underlying file system.Helper exception for those cases where the place where we need to check a stream capability is not where we have the needed context to explain the impact and mitigation for a lack.Compression validation test.A collection class that contains multiple sub-lists, which allows us to not copy lists.Utility methods for dealing with Collections, including treating null collections as empty.Utilities for storing more complex collection types inConfiguration
instances.A utility to store user specific HConnections in memory.ClassLoader used to load classes for Coprocessor instances.Helper class for coprocessor host when configuration changes.Deprecated.since 2.0.0 and will be removed in 3.0.0.Default implementation of an environment edge.Utilities for interacting with and monitoring DirectByteBuffer allocations.Wrapper around Hadoop's DNS class to hide reflection.This is a class loader that can load classes dynamically from new jar files under a configured folder.Has some basic interaction with the environment.Manages a singleton instance of the environment edge.This class handles the different interruption classes.EMA is similar toWeightedMovingAverage
in weighted, but the weighting factor decrease exponentially.Thrown when the file system needs to be upgradedThread that walks over the filesystem, and computes the mappings Region -> BestHost and Region ->Map<HostName, fractional-locality-of-region>
Implementation ofTableDescriptors
that reads descriptors from the passed filesystem.Utility methods for interacting with the underlying file system.Directory filter that doesn't include any of the directories in the specified blacklistAPathFilter
that only allows directories.Filter for all dirs that are legal column family names.APathFilter
that returns only regular files.Filter for HFiles that excludes reference files.Filter for HFileLinks (StoreFiles and HFiles not included).Called every so-often by storefile map builder getTableStoreFilePathMap to report progress.Filter for all dirs that don't start with '.'APathFilter
that returns usertable directories.Utility methods for interacting with the hbase.root file system.Helper class for processing futures.A generic way for querying Java properties.Helper class for gson.This class represents a common API for hashing functions.This class encapsulates a byte array and overrides hashCode and equals so that it's identity is based on the data rather than the array instance.HashKey<T>Used to calculate the hashHash
algorithms for Bloomfilters.Tool that prints out a configuration.Deprecated.For removal in hbase-4.0.0.This is a Tool wrapper that gathers -Dxxx=yyy configuration settings from the command line.Contact hdfs and get all information about specified table directory into regioninfo list.Contact a region server and get all information from itThis class contains helper methods that repair parts of hbase's filesystem contents.Deprecated.Since 2.3.0.Maintain information about a particular region.Stores the regioninfo entries from HDFSStores the regioninfo entries scanned from METAStores the regioninfo retrieved from Online region servers.Maintain information about a particular table.Helper class for all utilities related to archival/retrieval of HFilesAllows multiple concurrent clients to lock on a numeric id with a minimal memory overhead.An entry returned to the client as a lock objectAllows multiple concurrent clients to lock on a numeric id with ReentrantReadWriteLock.Mainly used as keys for HashMap.Uses an incrementing algorithm instead of the default.A supplier that throws IOException when get.Produces 32-bit hash for hash table lookup.Utility class for converting objects to JRuby.Utility for doing JSON and MBeans.Use dumping out mbeans as JSON.Utility class for converting objects to JSONThis class is a wrapper for the implementation of com.sun.management.UnixOperatingSystemMXBean It will decide to use the sun api or its own implementation depending on the runtime (vendor) used.Utility used running a cluster all in the one JVM.Datastructure to hold Master Thread and Master instanceDatastructure to hold RegionServer Thread and RegionServer instanceClass which sets up a simple thread which runs in a loop sleeping for a short interval of time.Utility class to get and check the current JVM version.KeyLocker<K>A utility class to manage a set of locks.A key range use in split coverage.Thrown when the lease was expected to be recovered, but the file can't be opened.hadoop 3.3.1 changed the return value of this method fromDatanodeInfo[]
toDatanodeInfoWithStorage[]
, which causes the JVM can not locate the method if we are compiled with hadoop 3.2 and then link with hadoop 3.3+, so here we need to use reflection to make it work for both hadoop versions, otherwise we need to publish more artifacts for different hadoop versions...Utility functions for reading the log4j logs that are being written by HBase.LossyCounting utility, bounded data structure that maintains approximate high frequency elements in data stream.An environment edge that uses a manually set value.Generate a classpath string containing any jars required by mapreduce jobs.A wrapper for a cell to be used with mapreduce, as the output value class for mappers/reducers.Utility class for MD5 MD5 hash produces a 128-bit digest.Utility methods for interacting with the regions.Move Regions and make sure that they are up on the target server.If a region movement fails we exit as failureMove Regions without Acknowledging.Usefule in case of RS shutdown as we might want to shut the RS down anyways and not abort on a stuck region.The purpose of introduction ofMovingAverage
mainly is to measure execution time of a specific method, which can help us to know its performance fluctuation in response to different machine states or situations, better case, then to act accordingly.Provides ability to create multiple Connection instances and allows to process a batch of actions using CHTable.doBatchWithCallback()Computes the optimal (minimal cost) assignment of jobs to workers (or other analogous) concepts given a cost matrix of each pair of job and worker, using the algorithm by James Munkres in "Algorithms for the Assignment and Transportation Problems", with additional optimizations as described by Jin Kue Wong in "A New Implementation of an Algorithm for the Optimal Assignment Problem: An Improved Version of Munkres' Algorithm".This is a very fast, non-cryptographic hash suitable for general hash-based lookup.This is a very fast, non-cryptographic hash suitable for general hash-based lookup.Event loop group related config.Helper class for processing netty futures.Wraps some usages of netty's unsafe API, for ease of maintainability.This implementation is not smart and just treats nonce group and nonce as random bits.A generic class for pair of an Object and and a primitive int value.ObjectPool<K,V> A thread-safe shared object pool in which object creation is expected to be lightweight, and the objects may be excessively created and discarded.AnObjectFactory
object is used to create new shared objects on demand.Used to describe or modify the lexicographical sort order of abyte[]
.Utility class that handles ordered byte arrays.Pair<T1,T2> A generic class for pairs.A generic, immutable class for pairs of objects both of typeT
.PoolMap<K,V> ThePoolMap
maps a key to a collection of values, the elements of which are managed by a pool.PoolMap.Pool<R>ExtendsByteRange
with additional methods to support tracking a consumers position within the viewport.Process related utilities.An instance of this class is used to generate a stream of pseudorandom numbers.Exception thrown when a read only byte range is modifiedUtility methods for recovering file lease for hdfs.Cache to hold resolved Functions of a specific signature, generated through reflection.Tool for loading/unloading regions to/from given regionserver This tool can be run from Command line directly as a utility.Builder for Region mover.RegionSplitCalculator<R extends KeyRange>This is a generic region split calculator.TheRegionSplitter
class provides several utilities to help in the administration lifecycle for developers who choose to manually split regions instead of having HBase handle that automatically.The format of a DecimalStringSplit region boundary is the ASCII representation of reversed sequential number, or any other uniformly distributed decimal value.HexStringSplit is a well-knownRegionSplitter.SplitAlgorithm
for choosing region boundaries.A generic interface for the RegionSplitter code to use for all it's functionality.A SplitAlgorithm that divides the space of possible keys evenly.The simple version of reservoir sampling implementation.Operation retry accounting.Policy for calculating sleeping intervals between retry attemptsConfiguration for a retry counterThis class maintains mean and variation for any sequence of input provided to it.A file storage which supports atomic update through two files, i.e, rotating.Handles ROW bloom related context.Handles ROWCOL bloom related context.An hash key for ROWCOL bloom.Handles ROWPREFIX bloom related context.Base class for command lines that start up various HBase daemons.Similar toRegionReplicaUtil
but for the server sideThis class provides ShutdownHookManager shims for HBase to interact with the Hadoop 1.0.x and the Hadoop 2.0+ series.A read only version of theByteRange
.SMA measure the overall average execution time of a specific method.A basic mutableByteRange
implementation.Extends the basicSimpleMutableByteRange
implementation with position support and it is a readonly version.Extends the basicAbstractPositionedByteRange
implementation with position support and it is a mutable version.Sleeper for current thread.SoftObjectPool<K,V> ASoftReference
based shared object pool.SortedList<E>Simple sorted list implementation that usesArrayList
as the underlying collection so we can support RandomAccess.This queue allows a ThreadPoolExecutor to steal jobs from another ThreadPoolExecutor.Utility for Strings.Only used for master to sanity checkTableDescriptor
.Thread UtilityMethods that implement this interface can be measured elapsed time.Triple<A,B, C> Utility class to manage a triple.This class finds the Version information for HBase.WeakObjectPool<K,V> AWeakReference
based shared object pool.Different from SMASimpleMovingAverage
, WeightedMovingAverage gives each data different weight.Instead of calculate a whole time average, this class focus on the last N.Utility class with methods for manipulating Writable objectsUtility functions for working with Yammer Metrics.Deprecated.Since 2.0.0.