@InterfaceAudience.Private public final class StoreUtils extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
private |
StoreUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.conf.Configuration |
createStoreConfiguration(org.apache.hadoop.conf.Configuration conf,
TableDescriptor td,
ColumnFamilyDescriptor cfd) |
static int |
getBytesPerChecksum(org.apache.hadoop.conf.Configuration conf)
Returns the configured bytesPerChecksum value.
|
static ChecksumType |
getChecksumType(org.apache.hadoop.conf.Configuration conf)
Returns the configured checksum algorithm.
|
static OptionalInt |
getDeterministicRandomSeed(Collection<HStoreFile> files)
Creates a deterministic hash code for store file collection.
|
(package private) static Optional<byte[]> |
getFileSplitPoint(HStoreFile file,
CellComparator comparator)
Gets the approximate mid-point of the given file that is optimal for use in splitting it.
|
(package private) static Optional<HStoreFile> |
getLargestFile(Collection<HStoreFile> candidates)
Gets the largest file (with reader) out of the list of files.
|
static long |
getLowestTimestamp(Collection<HStoreFile> candidates)
Gets lowest timestamp from candidate StoreFiles
|
static OptionalLong |
getMaxMemStoreTSInList(Collection<HStoreFile> sfs)
Return the largest memstoreTS found across all storefiles in the given list.
|
static OptionalLong |
getMaxSequenceIdInList(Collection<HStoreFile> sfs)
Return the highest sequence ID found across all storefiles in the given list.
|
(package private) static Optional<byte[]> |
getSplitPoint(Collection<HStoreFile> storefiles,
CellComparator comparator)
Gets the mid point of the largest file passed in as split point.
|
static long |
getStorefileFieldSize(HStoreFile file,
ToLongFunction<StoreFileReader> f) |
static long |
getStorefilesSize(Collection<HStoreFile> files,
Predicate<HStoreFile> predicate) |
static long |
getTotalUncompressedBytes(List<HStoreFile> files) |
static boolean |
hasReferences(Collection<HStoreFile> files)
Determines whether any files in the collection are references.
|
static List<StoreFileInfo> |
toStoreFileInfo(Collection<HStoreFile> storefiles) |
private static final org.slf4j.Logger LOG
private StoreUtils()
public static OptionalInt getDeterministicRandomSeed(Collection<HStoreFile> files)
public static boolean hasReferences(Collection<HStoreFile> files)
files
- The files.public static long getLowestTimestamp(Collection<HStoreFile> candidates) throws IOException
IOException
static Optional<HStoreFile> getLargestFile(Collection<HStoreFile> candidates)
candidates
- The files to choose from.public static OptionalLong getMaxMemStoreTSInList(Collection<HStoreFile> sfs)
public static OptionalLong getMaxSequenceIdInList(Collection<HStoreFile> sfs)
static Optional<byte[]> getFileSplitPoint(HStoreFile file, CellComparator comparator) throws IOException
file
- the store filecomparator
- Comparator used to compare KVs.IOException
static Optional<byte[]> getSplitPoint(Collection<HStoreFile> storefiles, CellComparator comparator) throws IOException
IOException
public static ChecksumType getChecksumType(org.apache.hadoop.conf.Configuration conf)
conf
- The configurationpublic static int getBytesPerChecksum(org.apache.hadoop.conf.Configuration conf)
conf
- The configurationpublic static org.apache.hadoop.conf.Configuration createStoreConfiguration(org.apache.hadoop.conf.Configuration conf, TableDescriptor td, ColumnFamilyDescriptor cfd)
public static List<StoreFileInfo> toStoreFileInfo(Collection<HStoreFile> storefiles)
public static long getTotalUncompressedBytes(List<HStoreFile> files)
public static long getStorefilesSize(Collection<HStoreFile> files, Predicate<HStoreFile> predicate)
public static long getStorefileFieldSize(HStoreFile file, ToLongFunction<StoreFileReader> f)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.